note
graff
<em>It's a windows thing!</em>
<br>Yes, indeed. Redirection to a file in unix works like this:
<br> - open output file for truncate (>) or append (>>)
<br> - start all processes involved in the pipeline
<br> - keep data flowing through the pipe to the file till
something quits.
<br>In windows/dos, it seems to go something like this:
<br> - run the first process in the pipeline, and put its
output somewhere; when it finishes:
<br> - start the next process (if any) and pass it the output
created by the previous process
<br> - when the last process is done, write its output to
the redirection file.
<br>Maybe windows does something to create the file first
(else you'd get a "file not found" error from unlink), but
it's protected until the OS is done with it (which is after
your process exits).
163693
163700