Jay Taylor's notesback to listing index
Redirect all subsequent commands' stderr using exec[web search]
Original source (unix.stackexchange.com)
Clipped on: 2017-11-15
I have a bash file that I need to redirect all output to one file, debug log as well as to the terminal. I need to redirect both stdout and stderr to the debug and log it for all commands in the script.
I do not want to add
I remember there was a way to do it with something like
Currently I'm using something like the following:
but it does not work. Does anyone have a solution/can explain the cause?