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

Roger A. Cornelius rac at jc3b21.UUCP
Sun Jul 10 07:17:59 AEST 1988


>From article <556 at philmds.UUCP<, by leo at philmds.UUCP (Leo de Wit):
< In article <12334 at mimsy.UUCP< chris at mimsy.UUCP (Chris Torek) writes:
<<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.
<<
        Much stuff deleted...

I missed the initial question, and responses prior to this on, but...

Another use is:

	[ something ] && {
	command 1
	command 2
	command 3...
	}

If I remember correctly, {} delimited commands execute in the current shell,
whereas () delimited commands execute in a subshell.

Roger Cornelius
-- 
                +---------- Roger Cornelius -----------+
                |            (813)347-4399             |
                | ...gatech!codas!usfvax2!jc3b21!rac   |
                +-   ...gatech!usfvax2!jc3b21!rac     -+



More information about the Comp.unix.questions mailing list