I am running several tasks simultaneously at background.
command_a | tee > command_a.log &
command_b | tee > command_b.log &
If everything is fine, then messages will be saved to log files.
If something wrong, it will print errors on screen.
But command_a and command_b are quite similar, it’s hard to tell which error message is generated by which command.
Can I add prefix string to error messages, like:
command_a: error 123
command_b: error 456
command_a: error 256
command_a: error 555
command_b: error 333