Memo‎ > ‎

Log to both stdout and file in a bash script

posted Aug 7, 2020, 6:12 AM by Teng-Yok Lee
REF: https://stackoverflow.com/a/22373735
LOG_FILE=/tmp/both.log exec > >(tee ${LOG_FILE}) 2>&1
Comments