101 reputation
bio website keymon.wordpress.com
visits member for 3 years, 5 months
seen Mar 12 at 14:50

comment Force bash script to use tee without piping from the command line
Really cool. I tested this on Solaris with bash 3.00.16 and it works. You can also use this to keep both stderr and stdout output in the script, and write everything to the same file. You spawn 2 tee in this case: exec > >(tee -a test.sh.$$.log); exec 2> >(tee -a test.sh.$$.log 1>&2)