[ILUG] plumbing

Stephen Shirley diamond at skynet.ie
Thu Oct 3 15:29:03 IST 2002


On Thu, Oct 03, 2002 at 10:21:29AM -0400, Wesley Darlington wrote:
> On Thu, Oct 03, 2002 at 03:17:27PM +0100, Stephen Shirley wrote:
> > On Thu, Oct 03, 2002 at 03:09:21PM +0100, Ciaran Treanor wrote:
> > > > >     mkfifo /tmp/something
> > > > >     program1 < /tmp/something &
> > > > >     program2 < /tmp/something &
> > > > >     cat myfile > /tmp/something
> > >
> > > When program1 consumes a character from the fifo isn't that
> > > character no longer available for consumption by program2 ?
> >
> > Yup.
>
> Doh! :-)

It is possible to use fifos as a solution here if you want.

mkfifo /tmp/out1
mkfifo /tmp/out2
mkfifo /tmp/out3

prog1 < /tmp/out1 &
prog2 < /tmp/out2 &
prog3 < /tmp/out3 &

cat myfile | tee /tmp/out1 | tee /tmp/out2 | tee /tmp/out3

Steve
--
High salt diets are bad for you - but only outside marriage.



More information about the ILUG mailing list