From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14871 invoked from network); 7 Dec 2000 17:29:07 -0000 Received: from sunsite.dk (HELO sunsite.auc.dk) (130.225.51.30) by ns1.primenet.com.au with SMTP; 7 Dec 2000 17:29:06 -0000 Received: (qmail 4923 invoked by alias); 7 Dec 2000 17:28:50 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3556 Received: (qmail 4297 invoked from network); 7 Dec 2000 17:21:26 -0000 From: "Bart Schaefer" Message-Id: <1001207171051.ZM3119@candle.brasslantern.com> Date: Thu, 7 Dec 2000 17:10:51 +0000 In-Reply-To: <000501c06058$6ac4e110$21c9ca95@mow.siemens.ru> Comments: In reply to "Andrej Borsenkow" "RE: Better ( rm foo; bar > foo ) < foo ?" (Dec 7, 5:17pm) References: <000501c06058$6ac4e110$21c9ca95@mow.siemens.ru> X-Mailer: Z-Mail (5.0.0 30July97) To: "Andrej Borsenkow" , "Danny Dulai" , "Zsh Users' List" Subject: Re: Better ( rm foo; bar > foo ) < foo ? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Dec 7, 5:17pm, Andrej Borsenkow wrote: } } Process substitutions are executed asynchronously. [...] } } mv =(grep one foo; grep two foo) foo } } second grep most probably will catch wrong file. The original question wanted stdin redirected from the file, so it could by definition not be read twice. In that case =(...) is "safe", except for the case where the async command fails and the original file is lost (which is why I suggested "mv -i" a couple of days ago). -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net