Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!sun-barr!olivea!orc!inews!iwarp.intel.com!gargoyle!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: comp.unix.questions Subject: Re: Piping into two processes simultaneously Keywords: Pipes, two processes Message-ID: <1990Sep06.150939.18741@chinet.chi.il.us> Date: 6 Sep 90 15:09:39 GMT References: <7053@milton.u.washington.edu> Distribution: usa Organization: Chinet - Chicago Public Access UNIX Lines: 19 In article <7053@milton.u.washington.edu> djo7613@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@chinet.chi.il.us