question about local variables in bash for cygwin

Cliff Hones cliff@aonix.co.uk
Mon Apr 8 07:29:00 GMT 2002


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/



More information about the Cygwin mailing list