From Redirect stdout & stderr and append to a file.
It is possible to redirect one output channel to another like “2>&1” which means “put the output of channel 2 (stderr) where right now channel 1 (stdout) goes” and let channel 1 point to a file:
process >>file 2>&1
But to be honest i would prefer you first solution with separately mentioned files for stdout and stderr anytime on weekdays and twice on sundays - it makes a much easier to maintain code AND it is not position dependent:
process >file 2>&1
will have stderr and stdout go to
process 2>&1 >file
will have stdout go to