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: behaviour of "for (( exp1; exp2; exp3 )); do COMMANDS; done"


"Peter Oosterlynck" <peter.oosterlynck@oracle.com> wrote in
<PHENJGDFMJPEBOBLGEMOKENMCBAA.peter.oosterlynck@oracle.com>
in gmane.os.cygwin on Tue, 27 May 2003 10:45:50 +0200:

> Tried it with a Bourne shell (sh) on my Redhat AS2.1: works fine.
> Tried it with a Bourne shell (sh) in cygwin : fails.

The default shell on Linux is (usually) bash. More importantly /bin/sh
is simply a link to /bin/bash.

/bin/sh on Cygwin defaults to ash, a drop-in replacement for the
Bourne Shell. /bin/sh != /bin/bash.

Make sure that if your script uses Bash-specific features, it starts
with #!/bin/bash and not with #!/bin/sh. That way it'll work anywhere.

Regards,
-- 
Sam Edge

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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]