Last active
October 8, 2016 16:59
-
-
Save rcanepa/5b5e776d7fffc87a040de34bd56149f3 to your computer and use it in GitHub Desktop.
Unix Tee
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ls /bin/ /usr/bin/ | tee >(grep x > x_files) | sort | uniq | grep wr | |
^ ^ output the ones with an wr in their name | |
from the list of all binaries, save to x_files the ones that contains and x in their name | |
cat data.txt | tee >(pbcopy) >(do_stuff) >(do_more_stuff) | grep important-stuff | |
^ ^ ^ | |
redirect the content of data.txt to three different tasks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment