Something that I'd love to be able to do, but haven't figured out how, yet:
You can run somecommand 2>&1 > log.txt to get STDOUT and STDERR together, but you won't know which is which.
You can run somecommand 2>err.txt >log.txt to get STDOUT and STDERR separate, but you won't know the timing, or which error messages happened between which STDOUT messages.
I'd like to figure out some way to combine both, so you end up with a file like this:
1: this was a STDOUT message
1: this was a STDOUT message
1: this was a STDOUT message
2: this was a STDERR message
2: this was a STDERR message
1: this was a STDOUT message
2: this was a STDERR message
1: this was a STDOUT message
1: this was a STDOUT message
1: this was a STDOUT message
1: this was a STDOUT message
1: this was a STDOUT message
2: this was a STDERR message
2: this was a STDERR message
Any ideas?
@mirabilos?
#Unix #UnixShell #Linux #BSD