I am writing several test scripts and want to catch all error output and write it to the error log, as well as all regular output and write it to a separate log. I use the form command
cmd> output.file 2> error.file
The command I'm writing test scripts with can cause a segmentation error. When the segfaults command, bash still prints a segmentation error on the terminal.
I want this to not happen or redirected along with the standard error.
Is it possible? It must be bash because both output streams are redirected.
source share