On Friday 21 January 2005 04:03, D. Bahi wrote:
> i'm no shell god but this seems suspect:
> your sourcing from and redirecting to the same file.

Yes, I can confirm this does not work (because I risked losing datas for this) 
- when doing, for instance:
sed a > a

 the shell first opens (and clears) the output file, and then creates the 
child processes.

Even a simple "cat a > a" will destroy the content of "a". It actually gives a 
warning by cat, but anyway the file will be destroyed.

Since you say it happens at times, maybe when bash forks, one child runs cat, 
and the other runs the second half of the pipeline (and clears the file)... 
so the result depends on which child is executed first.
-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
User-mode-linux-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to