IO Redirection – Pipe and Log STDOUT Simultaneously

io-redirectionpipe

Some programs output very detailed data, for readability I use awk to filter them.

./output_many_things | awk '{print $1 "\t" $2}'

But I don't want to miss anything. Could I redirect the complete output to a log file, but output the awked data to screen?

Best Answer

Absolutely. Stick tee in the pipeline.