Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!thumper!ulysses!gamma!mibte!ccd700!fmeed1!wehr
From: wehr@fmeed1.UUCP (Bruce Wehr)
Newsgroups: comp.unix.questions
Subject: Re: what's the use of "{ list }" in /bin/sh?
Summary: makes re-direction of a batch of commands easier
Message-ID: <409@fmeed1.UUCP>
Date: 6 Jul 88 18:32:10 GMT
References: <23590@teknowledge-vaxc.ARPA>
Organization: Ford EED, Dearborn Michigan
Lines: 22

In article <23590@teknowledge-vaxc.ARPA>, mkhaw@teknowledge-vaxc.ARPA (Mike Khaw) writes:
> "man sh" (on ultrix) says:
> 	{ list }
> 		The list is simply executed
> Under what circumstances is this useful (i.e., why whould one want to
> put braces around a list of commands)?

{
  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

{ echo "I hope these"; echo "examples are useful."; date; } 2>&1 | my.prog

-- 
                  Bruce Wehr ...!uunet!umix!teemc!fmeed1!wehr                   
            Ford Motor Company - Electrical and Electronics Division            
  17000 Rotunda Drive, DPTC Room LN081, Dearborn, Michigan 48121 (313)845-3039