From: Akim Demaille Date: Fri, 10 Nov 2000 12:10:13 +0000 (+0000) Subject: * doc/autoconf.texi (Shellology): Some about /usr/xpg4/bin/sh on X-Git-Tag: autoconf-2.50~446 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab3629569e6a19f11a7f2b7e4e214fb51138dc61;p=thirdparty%2Fautoconf.git * doc/autoconf.texi (Shellology): Some about /usr/xpg4/bin/sh on Solaris. Sort the entries. Some words about POSIX vs Bourne shell. From Russ Allbery and Robert Lipe. --- diff --git a/ChangeLog b/ChangeLog index 775383e86..4d49ecf2e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2000-11-10 Akim Demaille + + * doc/autoconf.texi (Shellology): Some about /usr/xpg4/bin/sh on + Solaris. + Sort the entries. + Some words about POSIX vs Bourne shell. + From Russ Allbery and Robert Lipe. + 2000-11-10 Akim Demaille * doc/autoconf.texi (Shell Substitutions): Split into... diff --git a/THANKS b/THANKS index daa80686b..77bc23258 100644 --- a/THANKS +++ b/THANKS @@ -4,7 +4,7 @@ people: Aaron Crane aaronc@pobox.com Aharon Robbins arnold@gnu.org -Akim Demaille akim@epita.fr +Akim Demaille akim@freefriends.org Alain Knaff Alain.Knaff@imag.fr Alec Wolman wolman@cs.washington.edu Alexandre Oliva oliva@lsd.ic.unicamp.br @@ -110,6 +110,7 @@ Raja R Harinath harinath@cs.umn.edu Ralf Corsepius corsepiu@faw.uni-ulm.de Ralf S. Engelschall rse@engelschall.com Richard Stallman rms@gnu.org +Robert Lipe robertlipe@usa.net Robert S. Maier rsm@math.arizona.edu Roland McGrath roland@gnu.org Ruediger Kuhlmann uck4@rz.uni-karlsruhe.de diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 69d0665fa..cb3bc20ab 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -5002,22 +5002,6 @@ family. Below we describe some of the members of the Bourne shell family. @table @asis -@item @command{bash} -@cindex @command{bash} -To detect whether you are running @command{bash}, test if -@code{BASH_VERSION} is set. To disable its extensions and require -@sc{posix} compatibility, run @samp{set -o posix}. @xref{Bash POSIX -Mode,, Bash @sc{posix} Mode, bash, The GNU Bash Reference Manual}, for -details. - -@item @command{zsh} -@cindex @command{zsh} -To detect whether you are running @command{zsh}, test if -@code{ZSH_VERSION} is set. By default @command{zsh} is @emph{not} -compatible with the Bourne shell: you have to run @samp{emulate sh} and -set @code{NULLCMD} to @samp{:}. @xref{Compatibility,, Compatibility, -zsh, The Z Shell Manual}, for details. - @item @command{ash} @cindex @command{ash} @command{ash} is often used on @sc{gnu}/Linux and @sc{bsd} systems as a @@ -5065,9 +5049,59 @@ from exiting: `exit 1` || echo "ash won't print it" @end example +@item @command{bash} +@cindex @command{bash} +To detect whether you are running @command{bash}, test if +@code{BASH_VERSION} is set. To disable its extensions and require +@sc{posix} compatibility, run @samp{set -o posix}. @xref{Bash POSIX +Mode,, Bash @sc{posix} Mode, bash, The GNU Bash Reference Manual}, for +details. + +@item @command{/usr/xpg4/bin/sh} on Solaris +@cindex @command{/usr/xpg4/bin/sh} on Solaris +The @sc{posix}-compliant Bourne shell on a Solaris system is +@command{/usr/xpg4/bin/sh} and is part of an extra optional package. +There is no extra charge for this package, but it is also not part of a +minimal OS install and therefore some folks may not have it. + +@item @command{zsh} +@cindex @command{zsh} +To detect whether you are running @command{zsh}, test if +@code{ZSH_VERSION} is set. By default @command{zsh} is @emph{not} +compatible with the Bourne shell: you have to run @samp{emulate sh} and +set @code{NULLCMD} to @samp{:}. @xref{Compatibility,, Compatibility, +zsh, The Z Shell Manual}, for details. @end itemize @end table +The following discussion between Russ Allbery and Robert Lipe is worth +reading: + +@noindent +Russ Allbery: + +@quotation +The @sc{gnu} assumption that @command{/bin/sh} is the one and only shell +leads to a permanent deadlock. Vendors don't want to break user's +existant shell scripts, and there are some corner cases in the Bourne +shell that are not completely compatible with a @sc{posix} shell. Thus, +vendors who have taken this route will @emph{never} (OK... ``never say +never'') replace the Bourne shell (as @command{/bin/sh}) with a +@sc{posix} shell. +@end quotation + +@noindent +Robert Lipe: + +@quotation +This is exactly the problem. While most (at least most System V's) do +have a bourne shell that accepts shell functions most vendor +@command{/bin/sh} programs are not the @sc{posix} shell. + +So while most modern systems do have a shell _somewhere_ that meets the +@sc{posix} standard, the challenge is to find it. +@end quotation + @node Shell Substitutions, Assignments, Shellology, Portable Shell @subsection Shell Substitutions