[ILUG] plumbing

Ulysees Ulysees at ulysees.com
Thu Oct 3 15:34:09 IST 2002


yep, no point in over complicating things though

and the reason I'm not just doing it twice is because the inital data is
being read from a different machine so I dont want to duplicate that read
(and take twice as long)

Stephens solution is looking even better at the moment so I'll give that a
shot now

Uly

----- Original Message -----
From: "David Neary" <dneary at wanadoo.fr>
To: <ilug at linux.ie>
Sent: Thursday, October 03, 2002 3:29 PM
Subject: Re: [ILUG] plumbing


> Wesley Darlington wrote:
> > Hi,
> >
> > On Thu, Oct 03, 2002 at 02:24:33PM +0100, Ulysees wrote:
> > > anybody know how I would go about using a pipe but to have 2 outputs ?
> > >
> > > eg cat myfile | program1
> > >      cat myfile | program2
> > >
> > > but happening at the same time ?
> >
> > Hmmm. How about...
> >
> >     mkfifo /tmp/something
> >     program1 < /tmp/something &
> >     program2 < /tmp/something &
> >     cat myfile > /tmp/something
>
> It would have to be
> mkfifo /tmp/pipe1
> mkfifo /tmp/pipe2
>
> program1 < /tmp/pipe1
> program2 < /tmp/pipe2
> cat myfile | tee pipe1 pipe2
>
> Then again I don't see why you wouldn't just do
> program1 < myfile
> program2 < myfile
>
> I'll assume that the "cat myfile |" bit was just to create a
> sample pipe.
>
> Cheers,
> Dave.
>
> --
>        David Neary,
>     Marseille, France
>   E-Mail: bolsh at gimp.org
> --
> Irish Linux Users' Group: ilug at linux.ie
> http://www.linux.ie/mailman/listinfo/ilug for (un)subscription
information.
> List maintainer: listmaster at linux.ie
>




More information about the ILUG mailing list