Date: Sat, 11 Oct 2014 19:50:42 +0200 From: Polytropon <freebsd@edvax.de> To: TonyMc <afmcc@btinternet.com> Cc: freebsd-questions@freebsd.org Subject: Re: sh man page .... Message-ID: <20141011195042.d33f5a95.freebsd@edvax.de> In-Reply-To: <20141011142538.45c9f45a@elena.home> References: <5437FB8B.9080008@hiwaay.net> <20141011142538.45c9f45a@elena.home>
next in thread | previous in thread | raw e-mail | index | archive | help
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, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141011195042.d33f5a95.freebsd>