what's the use of "{ list }" in /bin/sh?

Chris Torek chris at mimsy.UUCP
Thu Jul 7 04:46:43 AEST 1988


In article <3305 at palo-alto.DEC.COM> vixie at palo-alto.DEC.COM (Paul Vixie)
writes various examples (deleted), then:
>Summary: {list} is useful if you go southpaw with it.  Other than
>that it seems useless and I can't imagine why it exists.

Actually, it has one more use:

	while { setup; test } do ...

or any other place where a compound statement is needed and only
a single statement is allowed.  (while and until are about it!)

You could write

	while (setup; test) do ...

but that invokes an extra fork.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.unix.questions mailing list