Mailinglist Archive: opensuse-factory (401 mails)

< Previous Next >
Re: [opensuse-factory] Can we assume that /bin/sh is bash?
Martin Wilck <mwilck@xxxxxxxx> wrote:

I don't disagree. This is one argument for using a different shell,
which is in "feature freeze" mode. OTOH, the changes between bash 4.x
and 5.0 are rather insignificant in terms of shell script syntax,

I remember that we recently discoverd a significant difference between bash4
and bash4 while discussing shell behavior in the POSIX standard teleconference.
Sorry, I no longer remember what exactly this was related to.

I for one wouldn't want to rely on my brain's built-in Posix shell code
parser. I'd much prefer to have a computer do it for me.

I do it this way:

I primarily believe that the parser in bosh is correct, since it eveolved since
more than 42 years. Whenever I see a problem, I check the behavior of ksh88,
ksh93 and bosh and then decide using my brain what is correct.

The trick behind that method is that all three shells are direct descendents
from the original Bourne Shell (which is a good starter) and their maintainers
tried to do their best to fix problems in the behavior of the original Bourne

Writing a correct shell is definitely not trivial and other shells that have
been written from scratch usually have more or less deviations.


EMail:joerg@xxxxxxxxxx (home) Jörg Schilling D-13353 Berlin
joerg.schilling@xxxxxxxxxxxxxxxxxxx (work) Blog:
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-factory+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups