Python surpasses Perl in popularity?

Stephane Chazelas stephane.chazelas at unicyclist.com
Sun Nov 30 07:16:53 EST 2008


2008-11-30, 06:11(+00), Tam Ha:
> 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.
[...]

And on this. First, POSIX has no juridiction on defining the
Bourne shell, let alone its location as the Bourne shell is
completely outside POSIX, it's a legacy shell and as been for
years. Then, POSIX makes it clear that the location of its sh
utility (again, which the Bourne shell is not) is unspecified,
only that the lookup of "sh" via $PATH in a conformant
environment should resolve to a conformant "sh".

And if you need some examples to be convinced, see the different
choices of those 4 different POSIX conformant Unices:

Solaris (7, 8, 9 at least):
  /bin/sh: legacy Bourne/SVr4 shell
  /usr/xpg4/bin/sh: a POSIX compliant shell (actually ksh88)
  Solaris choice was to keep /bin/sh as the Bourne shell for
  backward compatibility (as changing it for a POSIX shell
  introduces a slight chance of breaking some existing scripts
  as there are a few corner-case areas where the POSIX shells
  are not backward compatible with the Bourne shell), and make
  /bin a non standard place. How to get a conformant environment
  (typically one where /usr/xpg4/bin/sh is before /bin) is
  described in standards(5). The default one is not, which makes
  Solaris a pain when porting scripts.

HPUX (10.10 and newer at least):
  /usr/bin/sh (and /bin/sh if there's a symlink /bin ->
  usr/bin): a POSIX compliant shell (based on ksh88)

  /usr/old/bin/sh: the Bourne shell (though I think nowadays,
  it's part of an optional package).

Tru64:
  /bin/sh can behave either as a Bourne shell or a POSIX shell
  (ksh88) depending on the environment

most Linux based systems and most other Unices:
  /bin/sh is a POSIX compliant shell (bash generally for Linux)
  and there's no Bourne shell (either there has never been or it
  has been removed/replaced by a POSIX shell).

-- 
Stéphane



More information about the Python-list mailing list