Python surpasses Perl in popularity?

Tam Ha not-for-mail at sonic.net
Sun Nov 30 01:11:46 EST 2008


Stephane CHAZELAS wrote:
> There's a common confusion in this in the nature of /bin/sh.
> There's no standard (neither POSIX nor Unix) that specifies that
> /bin/sh should be any variant of the Bourne shell.

Sure there is, POSIX.  Or rather their Austin Group. And while they done
an extremely poor job of it the POSIX shell is still the Bourne shell,
/bin/sh as it's always been known, with a few enhancements such as tilde
expansion and such.

> Over the years and on the different flavours of Unix, /bin/sh
> has been a Thomson shell, Mashey shell, Bourne shell and all its
> variants, Almquist shell, bash, ksh, zsh...

Zsh? Seriously? Where?  The fact that various flavors of Linux have
used various poorly designed "compatiblity mode" hacks to circumvent
Bourne/POSIX regardless of compatibility consequences does not change
the fact that /bin/sh is still there in all distributions, is still the
cross-platform compatibility winner by a county mile, and can still be
relied on for shell scripts.

>should have somewhere (and the location is not specified but on
>most Unices except those quoted above is generally /bin) a
>command called "sh" that is an interpreter of the POSIX shell
>language it defines.

Right, that's /bin/sh.  It's common name is the Bourne shell even though
it is not the code that Mr Bourne wrote years ago, and even though
GNU/POSIX and ATT/David Korn want to remake it into a "POSIX shell"
regardless of the compatibility consequences.

>That shell language is based on a subset of the ksh88 language
>and the Bourne shell is not a conformant implementation. 

Only if you limit your use of the term "Bourne shell" to something
that the rest of us don't recognize as a Bourne shell.  The fact that
POSIX has been known to jerry-rig ksh features (most of which werre
derived from tcsh by the way) into /bin/sh (and sort, and a few other
APIs they really should not be changing) only reflects the fact that
A) David Korn (still with ATT) has been pushing his vision, and B)
systems administrators (the ones who suffer most from cross-platform
incompatibilities) are not well represented within POSIX in general,
and not well represented within its Austin Group in particular.

Tam



More information about the Python-list mailing list