I am looking for a way to capture all the standard output and standard error into a file, as well as output it to the console. So:
(set it up here) set -x # I want to capture every line that executed too cat 'foo' echo 'bar'
Now the output from foo and bar, as well as the debug output from set -x, will be written to the log file and displayed on the console.
I canβt control how the file is called, so I need to configure it at the beginning of the file.
source share