This question already has an answer here:
When a script runs, commands in it may output some text to stdout/stderr. Bash itself may also output some text.
But if a few scripts are running at the same time, it is hard to identify where does an error come from.
So is it possible to insert a prefix to all output of the script? Something like:
#!/bin/bash prefix 'PREFIX' &2 echo "wrong!" >&2
$ ./script.sh PREFIXwrong!