On Sun, 13 Jul 2008 03:50:16 Randall R Schulz wrote:
[...snip...] You can simply detach the first (or both) commands by ending them with the ampersand ('&') character. When a program attempts to read from a named pipe with no writer, it will wait (as opposed to getting an end-of-file indication). Likewise when attempting to write to named pipe with no reader.
So in fact you're free to launch the programs in either order and they'll synchronize as necessary.
I did not realise that. Thanks for the tip.
The same goes for flow control. Pipes will simply block the writer if it's faster than the reader at the other end of the pipe.
So, something like this should work:
% mplayer -dumpstream -dumpfile streamdump -playlist "URL" & % ffmpeg -i streamdump outputFile &
Lastly, you can use the shell's built in "wait" command to cause it to wait for pending detached children to complete.
That's another one I've never tried...could be useful. Regards, -- =================================================== Rodney Baker VK5ZTV rodney.baker@iinet.net.au =================================================== How can you be in two places at once when you're not anywhere at all?