Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: command1 >>(command2)
- X-seq: zsh-users 8009
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: "Atom 'Smasher'" <atom@xxxxxxxxxxxxxx>
- Subject: Re: command1 >>(command2)
- Date: Mon, 20 Sep 2004 09:08:41 -0700 (PDT)
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <20040920053918.L344@willy_wonka>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20040920053918.L344@willy_wonka>
- Reply-to: zsh-users@xxxxxxxxxx
On Mon, 20 Sep 2004, Atom 'Smasher' wrote:
> where is this documented?
> command1 >>(command2)
That whole form of redirection, you mean? Look in "man zshexpn" or the
info doc section on "process substitution".
> i've found that it's useful for duplicating stdout into multiple commands
> but there doesn't seem to be any control over whether command2 or command3
> finishes first.
That's correct. The commands in the parens are run as background jobs,
which means they finish in whatever order the OS schedules them (which is
probably mostly dependent on when they stop receiving input). Zsh has to
let them run independently or I/O might deadlock, so you can't control it
except possibly with something like
command1 >>(command2;sleep 1) >>(command3;sleep 2)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author