[Bio-Linux] zsh

Tony Travis a.travis at abdn.ac.uk
Thu Feb 19 09:38:16 EST 2009


Tony Travis wrote:
> Dan Swan wrote:
>> Hello,
>>
>>> Under Ubuntu 8.04 LTS "bash" adopts a (very) strict POSIX compatibility
>>> mode when invoked as "sh". This has caused me some problems with (other
>>> people's!) shell scripts that use "#!/bin/sh", but expect to run "bash".
>> This is due to Ubuntu replacing /bin/sh with /bin/dash - not bash.  A
>> widely unpopular move from the forum posts it generated when it
>> hapepend.

Hello, again, Dan.

What I said about "bash" and "sh" is what I read on the "bash" 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.

OK, I completely misunderstood what was happening in scripts that worked 
under Ubuntu 6.06 but are broken under 8.04 because I didn't realise 
that the "sh" POSIX compliance was being imposed by "dash". I thought it 
was the POSIX behaviour of "bash" invoked being as "sh". Now I know it 
wasn't, but the symptoms are the same when scripts break because they 
expect BSD/GNU extensions to POSIX "sh" to be present when they are not.

Thanks for enlightening me,

	Tony.
-- 
Dr. A.J.Travis, University of Aberdeen, Rowett Institute of Nutrition
and Health, Greenburn Road, Bucksburn, Aberdeen AB21 9SB, Scotland, UK
tel +44(0)1224 712751, fax +44(0)1224 716687, http://www.rowett.ac.uk
mailto:a.travis at abdn.ac.uk, http://bioinformatics.rri.sari.ac.uk/~ajt




More information about the Bio-linux-list mailing list