Last active
March 4, 2017 19:25
-
-
Save pca2/6ab2278b6473e7a681b9ca748fc53c94 to your computer and use it in GitHub Desktop.
bash log function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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