is there an alternative to \"tee\" which captures STDOUT/STDERR of the command being executed and exits with the same exit status as the processed command. Something as followin
{ mycommand --foo --bar 2>&1; ret=$?; } | tee -a some.log; (exit $ret)