Re: Tightening up specification of /bin/sh
> ! The standard shell interpreter `<tt>/bin/sh</tt>' is a
> ! symbolic link to a POSIX compatible shell. Since the POSIX
> ! standard for shells leaves important areas unspecified,
> ! wherever it is lacking, `<tt>/bin/sh</tt>' shall follow the
> ! <em>consensus behavior</em> of other shell interpreters.
> ! Examples of behavior which is determined by consensus
> ! include the effect of <tt>echo -n</tt>, and the initial
> ! value of the <tt>IFS</tt> variable.
The meaning of POSIX will change from IEEE Std. 1003.2-1992
(ISO/IEC 9945-2:1993) to IEEE Std. 1003.1-200x in a not too
The behavior of echo -n is defined in the current draft of IEEE
Std. 1003.1-200x to print the string "-n", which is diffent from
the current implementation in for example ash and bash. Therefore,
if echo -n is portable on Linux today, it will probably not be
during the move to the new standard. (For example /bin/sh in
SunsOS 5.5 already has this new behavior.)
I don't see what you mean by "the initial value of the IFS
variable". Is there anything that is unspecified for field
splitting in IEEE Std. 1003.2-1992? Isn't "If IFS is not set, the
shell shall behave as if the value of IFS were the <space>, <tab>,
and <newline> characters." (page 123) enough?
My conclusion is that this concept of "consensus behavior" seems
too fragile to be useful.