How can I pipe the output of one command to the input of two other commands simultaneously?
feedback
|
|
It sounds like the The key is to use
for process substitution. With
So if you wanted to use the output of
The results of the | |||||||
feedback
|
|
Use "tee". Example:
This will send the output of the grep command to both the terminal and to wc (whose output is in turn redirected to the file grepresult). "Tee" is explained at http://en.wikipedia.org/wiki/Tee_(command). Central is: "The tee command reads standard input, then writes its content to standard output and simultaneously copies it into the specified file(s) or variables.". | ||||
|
feedback
|