Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!sdd.hp.com!hplabs!hpfcso!hpldola!hp-lsd!jimr From: jimr@hp-lsd.COS.HP.COM (Jim Rogers) Newsgroups: comp.unix.questions Subject: Re: Piping into two processes simultaneously Message-ID: <7370012@hp-lsd.COS.HP.COM> Date: 6 Sep 90 15:48:40 GMT References: <7053@milton.u.washington.edu> Organization: HP Logic Systems Division - ColoSpgs, CO Lines: 22 My solution is not elegant, but it does work: 1) Create a fifo file (named pipe) using the mkfifo command. i.e. mkfifo foofifo 2) Start the process(s) which write to the named pipe first. I found it easiest to run this part in the background. i.e. cat foo.input | tee foofifo | lp & 3) Start the processes which read from the named pipe in the foreground after the background process has been started. i.e. cat foofifo | more This will allow the data to be simultaneously printed and displayed to your screen. I suspect there are more elegant approaches. I hope this note string brings some of them out. Jim Rogers Hewlett Packard Company