[plug] Bash syntax error bad substitution

David Dartnall darts at dialix.com.au
Thu Dec 6 11:47:18 WST 2007

Tomasz Grzegurzko wrote:
> 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.
> dash is 100% POSIX compliant. Any script that uses the features of
> bash but uses /bin/sh in their header has not realised this, but it is
> a very common problem. There are many differences between bash and the
> original sh that people have come to rely upon. If you don't like it,
> then reconfigure dash, or complain to the script author that they've
> made a mistake.
> Tomasz
> _______________________________________________
> PLUG discussion list: plug at plug.org.au
> http://www.plug.org.au/mailman/listinfo/plug
> Committee e-mail: committee at plug.linux.org.au
Yes, I've got the message Tomasz, (and Russell) but I'm the author 
having learnt (in the last few weeks) enough shell scripting to do what 
I was attempting, from online tutorials which existed long before the 
advent of dash. Your last email relating to this encouraged me to do 
more research on the subject, and 
https://bugs.launchpad.net/ubuntu/+source/dash/+bug/61463, while it made 
the position clear, also indicated widespread concern about the breaking 
of older scripts. Thank you for your responses.
Dave D

More information about the plug mailing list