Skip to content

Instantly share code, notes, and snippets.

@timabell
Created March 22, 2013 23:10
Show Gist options
  • Select an option

  • Save timabell/5225457 to your computer and use it in GitHub Desktop.

Select an option

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