This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: question about local variables in bash for cygwin


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]