Skip to content

Instantly share code, notes, and snippets.

@timabell
Created March 22, 2013 23:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timabell/5225457 to your computer and use it in GitHub Desktop.
Save timabell/5225457 to your computer and use it in GitHub Desktop.
quick thing for logging what you've done on the console. needs exec bit. then run with "./logcommand.sh somecommand -args ..."
#!/bin/sh
echo >> testing.txt
echo "\$ $*" >> testing.txt
$* 2>&1 | tee -a testing.txt
echo >> testing.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment