help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] Duplicate one stdin as inputs to multiple programs witho


From: Peng Yu
Subject: Re: [Help-bash] Duplicate one stdin as inputs to multiple programs without creating temp files
Date: Mon, 13 Feb 2012 08:17:39 -0600

On Mon, Feb 13, 2012 at 1:10 AM, Pierre Gaston <address@hidden> wrote:
>
>
> On Mon, Feb 13, 2012 at 8:07 AM, Peng Yu <address@hidden> wrote:
>>
>> > tee <file >(prog1) >(prog2) >(prog3) >/dev/null
>>
>> Great. If I have 'prog' that accepts two input streams (as command
>> line arguments), I want to supply the same stdin to it, is there a way
>> to do so?
>>
>> prog1 file file # I do this with a temp file. How do it with the same
>> stdin input?
>
>
> Hmm, you can do it with named pipes:

I knew that named pipe could an option. But it creates a temp object
that need to be deleted later on. It will be nice to have something
that does not need to be deleted.

> mkfifo p1 p2
> tee < file p1 p2 >/dev/null &
> prog p1 p2
>
>  I haven't think to much about it, but I can't see a way with process
> substitution:

Does anybody know a way with pure process substitution?

-- 
Regards,
Peng



reply via email to

[Prev in Thread] Current Thread [Next in Thread]