Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Better ( rm foo; bar > foo ) < foo ?



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   



Messages sorted by: Reverse Date, Date, Thread, Author