Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!agate!garnet.berkeley.edu!ked From: ked@garnet.berkeley.edu (Earl H. Kinmonth) Newsgroups: comp.unix.questions Subject: Re: what's the use of "{ list }" in /bin/sh? Message-ID: <11755@agate.BERKELEY.EDU> Date: 7 Jul 88 14:56:11 GMT References: <23590@teknowledge-vaxc.ARPA> <409@fmeed1.UUCP> Sender: usenet@agate.BERKELEY.EDU Organization: University of California, Berkeley Lines: 25 >{ > echo "This is an example of how" > echo "one can use the { list } " > echo "construct to re-direct the" > echo "output of several commands." > date > who >} >$HOME/test.log > It should be noted that for this purpose { } has the advantage of NOT forking another shell unlike ( ) used in the same manner. On the other hand if you have cd within the { }, the effect of the cd will continue outside of the { } whereas with the ( ) construct, the effect is local. E H. Kinmonth, Hist. Dept., Univ. of Ca., Davis Davis, Ca. 95616 916-752-1636/0776 Disclaimer: This is AmeriKa! Who needs a disclaimer! Internet: ehkinmonth@ucdavis.edu cck@deneb.ucdavis.edu BITNET: ehkinmonth@ucdavis UUCP: {ucbvax, lll-crg}!ucdavis!ehkinmonth {ucbvax, lll-crg}!ucdavis!deneb!cck