tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Empty sub-shells and command groups in /bin/sh
In article <17323.1463479651%andromeda.noi.kre.to@localhost>,
Robert Elz <kre%munnari.OZ.AU@localhost> wrote:
>The posix shell standard does not allow empty sub-shells, or command
>groups. That is, both
> ( )
>and
> { }
>(even if you write the latter as "{ ; }" though it turns out the ';'
>there is not actually required, as it, or a \n, usually is before '}')
>are both syntax errors.
[stuff deleted]
>ps: various other places, beyond the one from PR bin/48489 (which is
>fixed already I believe) where empty "commands" were permitted will also
>get corrected by this fix.
I think we should probably have "strict posix mode" for this (via an
environment variable or command line switch?) ...
Allowing relaxed syntax like this is convenient.
christos
Home |
Main Index |
Thread Index |
Old Index