From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7970 invoked from network); 7 Dec 2000 14:17:46 -0000 Received: from sunsite.dk (HELO sunsite.auc.dk) (130.225.51.30) by ns1.primenet.com.au with SMTP; 7 Dec 2000 14:17:46 -0000 Received: (qmail 5864 invoked by alias); 7 Dec 2000 14:17:30 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3555 Received: (qmail 5857 invoked from network); 7 Dec 2000 14:17:29 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: "Danny Dulai" , "Hannu Koivisto" , "Zsh Users' List" Subject: RE: Better ( rm foo; bar > foo ) < foo ? Date: Thu, 7 Dec 2000 17:17:23 +0300 Message-ID: <000501c06058$6ac4e110$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 > > % cat foo > one > % mv =(sed 's/one/two/' foo) foo > % cat foo > two > > hows that? Process substitutions are executed asynchronously. So, you are just lucky to have small file. This particular example would work even in case of big file, because sed still has original file opened even after it has been renamed. But in general case you may have unexpected side effects ... something like mv =(grep one foo; grep two foo) foo second grep most probably will catch wrong file. -andrej