Skip to content

Instantly share code, notes, and snippets.

@paulcdejean
Created March 28, 2016 15:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulcdejean/30cbb9bd767b368296e7 to your computer and use it in GitHub Desktop.
Save paulcdejean/30cbb9bd767b368296e7 to your computer and use it in GitHub Desktop.
#!/bin/bash
today="$(date +%F)"
the_script="$0"
the_script=${the_script%.*}
the_script=${the_script##*/}
exec > >(tee -i "${the_script}.${today}.log")
exec 2>&1
ls
exec &>$(tty)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment