Re: POSIX shell; bash ash pdksh & /bin/sh
I must say that I am impressed with the debian community's response
to my suggestion that /bin/sh not be bash. I would be quite happy with
the supported option of making /bin/sh any posix compliant shell and am
happy with the way things are going. Hopefully I can help in some way.
My final thought on the subject, though, is that so long as /bin/sh
allows bashisms, unix youngsters who cut their teeth on linux will grow
up learning many bad habits; daily I curse bashisms when I try to port
scripts from the linux world to the real unix world at my day job. When
new hires come onto the scene from the linux world, they often have
terrible difficulty with using the Bourne shell of solaris or digital
unix, which lack the features even of the posix shell, let alone bash.
I would be most happy with a policy that makes /bin/sh a strictly
posix shell that yelps when it sees any ksh or bashism, but that allows
users to change to bash with the warning
"By using bash as /bin/sh this you may unintentionally write buggy
scripts because you may use extensions not common to the rest of unix.
When writing such scripts, it is more appropriate to use #!/bin/bash
or better yet #!/usr/bin/env bash to insure a maximum of portability
while enjoying enhanced features of the Bourne again shell."
and also make similarly prominent warnings in the documentation.
While it is a good goal of a browser to read any random garbage and
keep on trooping, I am not sure I would want to use a C compiler that
has the standard behavior of allowing extensions or syntax errors
because then I won't catch when I write something non-portable. It's
nice to have the flags to make it more lenient, but I think it's
improper default behavior because it encourages sloppiness.
Lastly, please note that I am not advocating getting rid of
/bin/bash. /bin/bash is good -- it is easy to use and makes users
smile. I am only suggesting that the linux community break the
assumption that /bin/sh is bash, an assumption that breaks in the
larger unix world.
Thanks; I hope I can be of use to the debian community.
Chris Ulrich firstname.lastname@example.org 530 754 4355
To UNSUBSCRIBE, email to email@example.com
with a subject of "unsubscribe". Trouble? Contact firstname.lastname@example.org