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.logThe output from the script is piped to tee and tee prints to stdout and appends to the specified log file.

Comments
Leave a Reply