From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23012 invoked from network); 20 Sep 2004 16:10:34 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 20 Sep 2004 16:10:34 -0000 Received: (qmail 84967 invoked from network); 20 Sep 2004 16:10:28 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 20 Sep 2004 16:10:28 -0000 Received: (qmail 17855 invoked by alias); 20 Sep 2004 16:09:43 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8009 Received: (qmail 17840 invoked from network); 20 Sep 2004 16:09:43 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 20 Sep 2004 16:09:43 -0000 Received: (qmail 82491 invoked from network); 20 Sep 2004 16:08:44 -0000 Received: from moonbase.zanshin.com (64.84.47.139) by a.mx.sunsite.dk with SMTP; 20 Sep 2004 16:08:42 -0000 Received: from toltec.zanshin.com (toltec.zanshin.com [64.84.47.166]) by moonbase.zanshin.com (8.13.1/8.13.1) with ESMTP id i8KG8fAr030433; Mon, 20 Sep 2004 09:08:41 -0700 Date: Mon, 20 Sep 2004 09:08:41 -0700 (PDT) From: Bart Schaefer Reply-To: zsh-users@sunsite.dk To: "Atom 'Smasher'" cc: zsh-users@sunsite.dk Subject: Re: command1 >>(command2) In-Reply-To: <20040920053918.L344@willy_wonka> Message-ID: References: <20040920053918.L344@willy_wonka> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-0.0 required=6.0 tests=BAYES_44 autolearn=no version=2.63 X-Spam-Hits: -0.0 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)