Mailinglist Archive: opensuse-factory (602 mails)

< Previous Next >
Re: [opensuse-factory] Can we assume that /bin/sh is bash?
"Dr. Werner Fink" <werner@xxxxxxx> wrote:

Ouch ... IMHO [[...]] is a major win for a bourne shell. If you're
teaching shell syntax there is no nead to mention [...] but only [[...]]
with ksh93 and bash. I do not see any advantage to use a minimal set

The advantage of using [[ instead of [ is minimal and you don't really need it
as you could write scripts that avoid it. ksh93 has other real advantages that
people usually miss and that BTW are just being destroyed by the Redhat people
that work on the https://github.com/att/ast/ repository.

of POSIX bourne shell. Here we have the fully control which bourne shell
should be used for /bin/sh. If systems will be ported from an old UNIX
system (and IMHO OpenSolaris is old ;) most most scripts will run even if

Correct, OpenSolaris is a true descendent from the original UNIX Code and as a
result, it will be able to look back at 50 years of of UNIX history in August
this year.

If you look at the kernel, there are many modern concepts inside Solaris,
that are still missing in Linux, so what do you understand by "old"?

written for minimal POSIX bourne shell. There is no need to use a
castrated bourne shell aka minimal POSIX bourne shell on Linux.

The advantage of using a small but POSIX shell as the default shell (in special
if it supports "modern" features like vfork() that are unsupported by bash) is a
faster and more robust startup. Even on a true UNIX, there are other shells in
addition, but these shells are used after the basic startrup is ready.

Finally: /bin/sh is not mentioned in POSIX it is not "the POSIX shell" of a
platform, it is just the default shell. In theory, you could install something
that stinks like "fish" as /bin/sh if you adjust your scripts and if you
follow the official rules for providing a POSIX shell.

The POSIX shell is run after you type:

PATH=`getconf PATH`
sh

and typically is in a path like /usr/xpg?/bin/sh

Jörg

--
EMail:joerg@xxxxxxxxxx (home) Jörg Schilling D-13353 Berlin
joerg.schilling@xxxxxxxxxxxxxxxxxxx (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.org/private/ http://sf.net/projects/schilytools/files/'
--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-factory+owner@xxxxxxxxxxxx

< Previous Next >