Skip to content

Instantly share code, notes, and snippets.

@ivan-krukov
Created November 10, 2012 01:20
Show Gist options
  • Save ivan-krukov/4049388 to your computer and use it in GitHub Desktop.
Save ivan-krukov/4049388 to your computer and use it in GitHub Desktop.
A little output logging tool
#!/bin/sh
cmd=$*
pid=$$
echo "$cmd @ `pwd`; Started at `date`" > $pid.out
echo "[$pid] $cmd"
eval $cmd >> $pid.out 2>> $pid.err
echo "$cmd @ `pwd`; Finished at `date`" >> $pid.out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment