Example of duplicating some parts of output stream:
echo 'this is the first line\nthis is second output' | tee >(head -n 1) | grep 'second'
Example of duplicating some parts of output stream:
echo 'this is the first line\nthis is second output' | tee >(head -n 1) | grep 'second'