Bug/misfeature in 4bsd /bin/sh

Guy Harris guy at auspex.UUCP
Sat Nov 19 03:15:43 AEST 1988


>All the non-Berkeley versions of UNIX I can get my hands on give:

...

>This is consistent with the man page for sh(1), where it says:

...

>On the other hand, under 4.3bsd we're treated to the following:

...

>Eh?  I notice also that the Berkeley folks have removed the above
>sentence from the sh(1) man page.  The question I have, is this all
>a bug or a misfeature?  Does anyone happen to know why they changed
>the semantics of the shell in this somewhat rude way?

Did you try this under V7? The Berkeley shell is, as I remember, pretty
much the V7 shell, with support for "#" comments added.  If it does the
wrong thing under V7, you may have made an incorrect assumption here,
namely that in the Good Old Days it did the right thing and Berkeley
gratuitously changed it and ripped the comment in question from the man
page.  It may, in fact, have been that AT&T *fixed* the behavior of the
shell and *added* the comment in question.  Blame where blame is due,
and all that....

>(Someone reports that even SunOS gets it right, despite being
>4bsd-derived.

Another incorrect assumption; SunOS cannot be described solely by the
term "4bsd-derived".  SunOS 3.0's Bourne shell and "make" were derived
from the System V Release 2 versions, and the Bourne shell has been an
S5 one ever since, which is why it gets it right.



More information about the Comp.unix.wizards mailing list