Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

common pipe for multiple programs 2

Status
Not open for further replies.

codemut

Programmer
Feb 29, 2008
26
0
0
US
How might the following bash code be modified to suppress tee's output to terminal?

./prog1 | tee >(./prog2 > file1) >(./prog3 > file2)
 
Just make the second programme consume the tee stdout instead of using a second process substition:

[tt]./prog1 | tee >(./prog2 > file1) | ./prog3 > file2 [/tt]

Or simply dump stdout:

[tt]./prog1 | tee >(./prog2 > file1) >(./prog3 > file2) >/dev/null [/tt]

Annihilannic.
 
Why using the tee command ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks Annihilannic; the program now works as desired.
To answer PHV, there is an error without the tee; the cause is undiscovered.
 
What about this ?
./prog1 | ./prog2 | tee file1 | ./prog3 > file2

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top