Reputation
Next privilege 125 Rep.
Vote down
Badges
0 0 0
Impact
0 people reached

  • 0 posts edited
  • 0 helpful flags
  • 0 votes cast
Oct
20
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)