From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <13426df10705151629u18d15ea1o2d5d4cab218479a5@mail.gmail.com> Date: Tue, 15 May 2007 16:29:45 -0700 From: "ron minnich" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu> Subject: Re: [9fans] A simple rc question In-Reply-To: <4648BF8D@webmail.snc.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <4648BF8D@webmail.snc.edu> Topicbox-Message-UUID: 67ffd718-ead2-11e9-9d60-3106f5b1d025 On 5/15/07, Benn Newman wrote: > Duff answered ron's question in "Rc =97 The Plan 9 Shell". > > 12. Command grouping > > A sequence of commands enclosed in {} may be used anywhere a command i= s > required. For example: > > {sleep 3600;echo 'Time''s up!'}& > > will wait an hour in the background, then print a message. Without the > braces, > > sleep 3600;echo 'Time''s up!'& > > would lock up the terminal for an hour, then print the message in the > background. it does not really answer the question. cmd ; cmd is two commands. cmd | cmd is one command. cmd ; cmd & will background the second command cmd|cmd & should background both. Just try this: sleep 5|wc and then sleep 5|wc& The | forms the two commands into a compound and the compound is background= ed. That works fine. But in a for it did not. This did work however: for(i){{tail -f $i | whatever}&} ron