sh man page ....

Polytropon freebsd at edvax.de
Sat Oct 11 17:50:52 UTC 2014


On Sat, 11 Oct 2014 14:25:38 +0100, TonyMc wrote:
> It seems to me you have this the wrong way around.  /bin/sh is the
> Bourne shell, [...]

On FreeBSD, /bin/sh is not exactly the (original) Bourne
shell, but the Almquist shell, also known as "ash". It
implementss the standard features of the Bourne shell.



> [...] bash is sh-like, so surely it is the task of the bash
> maintainers to document incompatibilities with the Bourne shell?

This is a valid opinion. The understanding of bash is
"sh plus something more", so when the part "sh" differs
from traditional sh implementations or standards, it
should be mentioned. Among others, POSIX is such a set
of requirements: if all of them are met, the shell can
be called a "POSIX shell".



> The
> "a" in bash is for "again", so it is clearly intended as a Bourne-shell
> inspired shell.

Or "born again". :-)



> The example you give of silently evaluating empty
> strings as numeric zero is exactly the sort of incompatibility that
> should be documented in the bash man page.  But it is not the sh
> shell's problem, surely?

Things like "silently assuming or implying something" usually
is not a good idea. Sometimes you intededly _want_ a numeric
parameter to be differentiable between 0 (the value zero) or
"" (empty string, not set), because it makes a difference in
the program.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list