|
|
|
|
|
by ori_b
5130 days ago
|
|
> I can't even count the number of times I wanted to pipe an output of one program to multiple others ls | tee >(frob x) | grep y
should output the output of ls to both 'grep x' and 'grep y'. The '>(foo)' syntax in bash will create a subshell to run the pipeline in the parens, and evaluate to the name of the FD for the pipeline (eg, /dev/fd/42).For multiple inputs, similarly: grep foo <(ls dir1) <(cat somefile)
|
|