Skip to content

Instantly share code, notes, and snippets.

@pca2
Last active March 4, 2017 19:25
Show Gist options
  • Save pca2/6ab2278b6473e7a681b9ca748fc53c94 to your computer and use it in GitHub Desktop.
Save pca2/6ab2278b6473e7a681b9ca748fc53c94 to your computer and use it in GitHub Desktop.
bash log function
log(){
datestamp=$(date +%Y-%m-%d_%H:%M:%S)
msg="$@"
echo "[$datestamp]- $msg"
}
#call with: log <whatever msg you want>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment