Is there an alternative to tee which captures standard output and standard error of the command being executed and exits with the same exit status as the processed command?
Something like the following:
eet -a some.log -- mycommand --foo --bar
Where "eet" is an imaginary alternative to "tee" 🙂 (-a means append and -- separates the captured command). It shouldn’t be hard to hack such a command, but maybe it already exists and I’m not aware of it?
Here’s an
eet. Works with every Bash I can get my hands on, from 2.05b to 4.0.(
pipefailand$PIPESTATUSare nice, but I recall them being introduced in 3.1 or thereabouts.)