cheat/cheat/cheatsheets/tee
2018-09-19 17:53:19 -07:00

9 lines
263 B
Plaintext

# To tee stdout to a file:
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"