Bash stdout & write output to file

To display dual output on standard output (stdout) and write or append the output to a file, use tee. For example, do the following:

python ./myscript.py | tee -a output.log

The output from the script is piped to tee and tee prints to stdout and appends to the specified log file.

View this page on GitHub.
Posted .

Comments

Leave a Reply