bin/125855: sh(1) allows for multiline, non-escaped control structures (and thus isn't POSIX compliant)

Oliver Fromme olli at lurza.secnetix.de
Tue Jul 22 13:03:40 UTC 2008


Actually I think that both bash's and sh's behaviour is
correct.  As far as I can see in the refrenced standard
sections, there is no requirement that there must be no
newline character after the reserved word "!".  It seems
to be unspecified.

FWIW, Solaris' POSIX shell (/bin/ksh and /usr/xpg4/bin/sh)
allows a newline character, so it behaves the same as our
/bin/sh.  (Note that Solaris' /bin/sh is intentionally not
a POSIX shell, it doesn't know "!" at all.)

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"When your hammer is C++, everything begins to look like a thumb."
        -- Steve Haflich, in comp.lang.c++


More information about the freebsd-bugs mailing list