Skip to content

Instantly share code, notes, and snippets.

@urbanautomaton
Created July 6, 2016 19:01
Show Gist options
  • Save urbanautomaton/6f10fb983d8bb6a36548d47ad310de62 to your computer and use it in GitHub Desktop.
Save urbanautomaton/6f10fb983d8bb6a36548d47ad310de62 to your computer and use it in GitHub Desktop.
appending script output to a logfile
#!/usr/bin/env bash
exec 1> >(tee -a somefile.log) 2>&1
echo "hello"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment