OS X / Linux: pipe into two processes?

You can do this with tee and process substitution.

program1 | tee >(program2) >(program3)

The output of program1 will be piped to whatever is inside ( ), in this case program2 and program3.

Leave a Comment