Output to standard out AND a file at the same time

September 30, 2013

Let’s say you’re running a script, and you want the output to show up in the terminal and be output to a file simultaneously. This is how to do that:

<your-command-here> | tee <output-file>


./myscript.sh | tee out.txt

Deep Learning and Artificial Intelligence Newsletter

Get discount coupons, free machine learning material, and new course announcements