9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "ron minnich" <rminnich@gmail.com>
To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu>
Subject: Re: [9fans] A simple rc question
Date: Tue, 15 May 2007 16:29:45 -0700	[thread overview]
Message-ID: <13426df10705151629u18d15ea1o2d5d4cab218479a5@mail.gmail.com> (raw)
In-Reply-To: <4648BF8D@webmail.snc.edu>

On 5/15/07, Benn Newman <benn.newman@snc.edu> wrote:
> 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.


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 backgrounded.

That works fine. But in a for it did not. This did work however:
for(i){{tail -f $i | whatever}&}

ron


  reply	other threads:[~2007-05-15 23:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-15 23:03 Benn Newman
2007-05-15 23:29 ` ron minnich [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=13426df10705151629u18d15ea1o2d5d4cab218479a5@mail.gmail.com \
    --to=rminnich@gmail.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).