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



    Date:        Tue, 17 May 2016 16:10:37 +0000
    From:        David Holland <dholland-tech%netbsd.org@localhost>
    Message-ID:  <20160517161037.GA1335%netbsd.org@localhost>

  | On Tue, May 17, 2016 at 04:05:57PM +0000, Christos Zoulas wrote:
  |  > 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
  |  > >	{ }

  |  > I think we should probably have "strict posix mode" for this

  | For braces, yes - that is at least semantically sensible. For a
  | subshell, I'd say not so much.

OK, absent further comment, the current plan is to simply ban empty
commands (truly empty, in the input form) as posix requires, except
for '{ }' which will only generate an error in posix (standards compliant)
mode (the options for which exist already.)

Any objections?

kre



Home | Main Index | Thread Index | Old Index