[plug] Bash syntax error bad substitution
Russell Steicke
russellsteicke at gmail.com
Thu Dec 6 11:31:07 WST 2007
On Dec 6, 2007 11:12 AM, David Dartnall <darts at dialix.com.au> wrote:
> Mike Holland wrote:
> > David Dartnall wrote:
> >> A change from #!/bin/sh to #!/bin/bash at the start of the script
> >> fixed the problem
> >
> > So your script claimed to be bourne shell, but really depended on bash
> > features. Not unusual.
> No, /bin/sh previously had a link pointing to /bin/bash which the ubuntu
> update apparently changed to /bin/dash.
If your shell script starts with "#!/bin/sh" then it's claiming to be
a bourne shell script. If you're depending on bash features in that
script, you're lying to the shell and to yourself. #!/bin/sh is a
promise to the shell interpreter that you only need sh features. dash
provides that.
--
Virus found in this message.
More information about the plug
mailing list