Piping into two processes simultaneously
Leslie Mikesell
les at chinet.chi.il.us
Fri Sep 7 01:09:39 AEST 1990
In article <7053 at milton.u.washington.edu> djo7613 at hardy.u.washington.edu (Dick O'Connor) writes:
>One of our users phoned me with the question "How do I pipe a stream of
>output into two separate processes at the same time?" Well, I said tee,
>not thinking, and he said, processes, not files.
Both tee and processes are perfectly happy with FIFO's if your system
has them.
/etc/mknod fifo p
process3 < fifo &
process1 | tee fifo | process2
rm fifo
process3 will block until something is written to the fifo and will receive
EOF when the last data has been read and it is no longer open by any process
for writing.
Les Mikesell
les at chinet.chi.il.us
More information about the Comp.unix.questions
mailing list