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: Pierre Gaston
Subject: Re: [Help-bash] Duplicate one stdin as inputs to multiple programs without creating temp files
Date: Mon, 13 Feb 2012 09:10:28 +0200



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:

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:



reply via email to

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