This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: question about local variables in bash for cygwin
- From: "Cliff Hones" <cliff at aonix dot co dot uk>
- To: <cygwin at cygwin dot com>
- Date: Mon, 8 Apr 2002 15:29:55 +0100
- Subject: Re: question about local variables in bash for cygwin
- Organization: Aonix Europe Ltd.
- References: <000601c1df07$aa056550$3f891581@proxy>
Evan Teran <emt3734@ritvax.isc.rit.edu> writes:
> Hello I have cygwin installed on my WinXP box and am loving it. However
> I just noticed today that when I tried to use the local keyword in my
> bash script it gives me the error "local: not found". The script works
> on a RedHat box as expected so I would think that this is a cygwin/bash
> problem.
On Linux /bin/sh is normally bash, but on Cygwin it is ash,
and ash does not support 'local'. Change the first line
to #!/bin/bash and it should work.
Cliff
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/