8 logto - Run a command and append its STDOUT and STDERR to a file
15 if [ ".$1" = ".--help" ]
17 echo "Usage: $0 <FILENAME> <COMMAND> [<ARGS>]"
18 echo "Save command's output (stdout and stderr) to file and keep normal stdout and stderr as well."
29 exec "$@" 2> >(tee -a "$logfile" >&2) |
tee -a "$logfile"