On Tue, 17 Jun 2008, Stephane Chazelas wrote:
PS. Where is the online POSIX Bourne shell spec?
That is contradictory. The Bourne shell is not POSIX sh
conformant. The Bourne shell is something from the past, like
the Thomson shell (also called sh) was made something from the
past when the Bourne shell came up.
Um no, Bourne is and always has been the standard Unix shell. POSIX cannot
change that nor should it. Bourne is the one scripting language that has a
common syntax across all popular Unix and Linux variants (with some
bashisms added in non-compliant GNU implementations). Any experienced
systems administrator knows that common Bourne syntax, not POSIX Bourne
syntax, is required for cross-platform compatibility (of install scripts
and such).
The POSIX sh (and utilities) spec is now embedded in the Single
Unix Specification which you can find on the opengroup web site.
Only if you worship at the GNU "embrace and extend" church. What other
popular Unix-like OS implements POSIX's non-backwards compatible sh spec?
Note that the POSIX sh is not fully backward compatible with the
Bourne shell which explains why some vendors like Solaris still
keep their Bourne shell as /bin/sh and have the standard sh in
another place (which POSIX/SUS doesn't prohibit, but still
causes pain to anyone wanting to write portable scripts).
Depends on how you look at it. Because the addition of LANG=C and
_POSIX2_VERSION=199209 is required for portability, by definition, POSIX sh
is not compliant with the de facto standard.
IMO, sh and sort are areas where the Austin Group is seriously out of touch
with the reality of systems administration, and /bin/sh is primarily a
systems administrators tool. Inclusion of more full time systems
administrators would go a long way to providing some QA for such "new
standards", before they compromise backwards and cross-platform
compatibility.
Roger Marquis
|