On 14.01.2011 13:11, Adrian Levi wrote:
On 14 January 2011 21:51, Mart Frauenlob<mart.frauen...@chello.at> wrote:
in debian lenny (and previous releases) the default shell aka sh is bash.
the file /bin/sh is a symbolic link to /bin/bash.
however in squeeze afaik the default shell is dash.
so your script starting with the shebang #!/bin/sh will not be run from
bash.
to ensure you want it to be executed by bash (if you don't start it with
'bash filename') put the shebang line as #!/bin/bash (#!/bin/bash -x to
debug).
Not sure exactly what bash (as compared to sh) specific things I might
be experiencing but from the man page:
"If bash is invoked with the name sh, it tries to mimic the startup
behavior of historical versions of sh as closely as possible, while
conforming to the POSIX standard as well."
I didn't previously state it but I am running Lenny 5.0.7 on this
machine. I don't like it when things break unexpectedly.
dash belongs to the 'ash' family of shells.
bash belongs to the 'bourne shell' family of shells.
if /bin/sh points to /bin/dash and you're not invoking your script with
'/bin/bash filename' then it'll be run by dash not bash.
further reading:
http://en.wikipedia.org/wiki/Shebang_%28Unix%29
http://www.in-ulm.de/~mascheck/various/shebang/
http://groups.google.com/group/comp.unix.shell/browse_thread/thread/4d4df46503333ab9
Thanks Mart,
Hopefully that may shed some further light on my problem?
that's not the problem ;-)
best regards
mart
--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4d30442b.9020...@chello.at