diff --git a/cheat/cheatsheets/tee b/cheat/cheatsheets/tee index 301d4df..f2de805 100644 --- a/cheat/cheatsheets/tee +++ b/cheat/cheatsheets/tee @@ -3,3 +3,6 @@ ls | tee outfile.txt # To tee stdout and append to a file: ls | tee -a outfile.txt + +# To tee stdout to the terminal, and also pipe it into another program for further processing: +ls | tee /dev/tty | xargs printf "\033[1;34m%s\033[m\n"