Let's say I have two scripts, one calls the other, how can I prepend text to each echo to visually indicate the echo comes from the called command?
a.sh
#!/usr/bin/env sh
echo - BEGIN
./b.sh # Append "-" to each echo?
echo - END
b.sh
#!/usr/bin/env sh
echo - BEGIN
echo - END
Output I want:
- BEGIN
-- BEGIN
-- END
- END
I can't touch b.sh and I need to stream the output.