Subject: Re: behaviour of "for (( exp1; exp2; exp3 )); do COMMANDS; done"
From: Sam Edge <[email-masked]>
To: [email-masked]
Date: Tue, 27 May 2003 12:42:21 +0100

"Peter Oosterlynck" <[email-masked]> wrote in
<[email-masked]>
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/