This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: Math working on command line but not in script
- From: Brian Dessent <brian at dessent dot net>
- To: Cygwin <cygwin at cygwin dot com>
- Date: Tue, 23 Sep 2003 01:01:26 -0700
- Subject: Re: Math working on command line but not in script
- Organization: My own little world...
- References: <DDEDIPLLKIAMLBCBFCHECEDGCPAA.relaxedrob@optusnet.com.au>
Robert Mark Bram wrote:
>
> Howdy All!
>
> I have a small script called maths.sh with the following code in it:
>
> #/usr/bin/bash
The features you're trying to use are bash-specific. The above shebang
is not correct (you need a ! after the #, as in "#!/path/to/file") and
so the script is being executed not by bash but by sh which doesn't
understand the $(( foo )) syntax.
Brian
--
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/