Linux: Bash redirect Stderr and Stdout to a log file and to Stdout
If you want to redirect all output of a script into log file, but at same time into stdout, this is the code to write at the script file start: LOG_FILE=file.log exec &> >(tee -a “$LOG_FILE”)