This is the mail archive of the
mailing list for the Cygwin project.
Re: Unable to properly execute a let statement from a shell script
- From: Brian Dessent <brian at dessent dot net>
- To: cygwin at cygwin dot com
- Date: Mon, 31 Jan 2005 00:38:40 -0800
- Subject: Re: Unable to properly execute a let statement from a shell script
- Organization: My own little world...
- References: <00b201c50767$a507e0b0$f968dc54@I2.COM>
- Reply-to: cygwin at cygwin dot com
Paolo Gesmundo wrote:
> I know that I could modify a.sh by adding #!/bin/bash
> at the top of the file but I would need to avoid this
> otherwise I have to modify too many scripts
> Is there a way to run a.sh like in Case 1 and get the
> proper result like in Case 2?
It sounds like your scripts are banking on the assumption that under
linux, sh=bash, whereas on Cygwin sh=ash. So, you can't get away with
using bash-isms in scripts without shebangs because you are relying on a
specific quirk of linux. If you require bash-specific features you need
to either call bash explicitly in the shebang or exec the script from
bash. Otherwise your script is not going to be portable on any system
other than linux. bash != sh.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html