How to redirect output to a file as well as display it out
December 6th, 2007 mysurface
To redirect standard output to a file is easy, you just need to use the redirection symbol, for example:
echo “hello world” > test.txt
But what if I want to display it out as well as store into a file?
Answer: tee
echo “hello world” | tee test.txt
Okay it seems very easy, how about append?
Related PostsDisplay & log command [...]
Posted in Text Manipulation, pipeline, python, tee | Hits: 32846 | 5 Comments »
Live Chat!








