9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* RE: [9fans] A simple rc question
@ 2007-05-15 23:03 Benn Newman
  2007-05-15 23:29 ` ron minnich
  0 siblings, 1 reply; 9+ messages in thread
From: Benn Newman @ 2007-05-15 23:03 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Duff answered ron's question in “Rc — The Plan 9 Shell”.

   12. Command grouping

   A sequence of commands enclosed in {} may be used anywhere a command is
   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.

>===== Original Message From Fans of the OS Plan 9 from Bell Labs 
<9fans@cse.psu.edu> =====
>> I suspected that and will try it, but the man page is pretty clear (I
>> thought) that
>> a|b is a single command. I still think the & should bind to the
>> pipeline, but ...
>
>a PIPE is a cmd, so i'd expect that too.
>it would also be tedious if
>	cat burp | sed 's/mumble/frog/' | md5sum &
>ran only the md5sum in the background.

--
Benn Newman



^ permalink raw reply	[flat|nested] 9+ messages in thread
* [9fans] A simple rc question
@ 2007-05-15 15:38 ron minnich
  2007-05-15 15:46 ` Charles Forsyth
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: ron minnich @ 2007-05-15 15:38 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

This is a quick attempt at multitail, which does a tail -f on lots of
files, printing the lines from each with the name prepended.

This thing almost works -- except it blocks on each command, not & as
I expect. What did I do wrong?

#!/bin/rc
for(f)
	tail -f $f |  awk '{print "'^$f^':" $0}'&


ron


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-05-16  0:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-15 23:03 [9fans] A simple rc question Benn Newman
2007-05-15 23:29 ` ron minnich
2007-05-15 23:35   ` Kris Maglione
  -- strict thread matches above, loose matches on Subject: below --
2007-05-15 15:38 ron minnich
2007-05-15 15:46 ` Charles Forsyth
2007-05-15 15:48 ` erik quanstrom
2007-05-15 16:08   ` ron minnich
2007-05-15 16:18     ` Charles Forsyth
2007-05-16  0:24 ` Kris Maglione

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).