I have a script that QA Manager runs. I want him to take a look at terminal from time to time to take a note if any errors appear.
The problem is that the script have a ton of output that we do not need to see.
What I am trying to implement:
Another way is to
Will be very grateful if someone can help with that.
with bash, using a process substitution, with the redirections performed in this order:
cmd 2> >(tee -a full-log.txt) >full-log.txt
Demo:
$ { echo "this is stdout"; echo "this is stderr" >&2; } 2> >(tee -a full-log.txt) >full-log.txt
this is stderr
$ cat full-log.txt
this is stdout
this is stderr