Created
February 17, 2016 08:58
-
-
Save jacek213/bfd6b3be8bb2202e2962 to your computer and use it in GitHub Desktop.
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
# pass message | |
log() { | |
now=$(date "+%d.%m.%Y %H:%M:%S") | |
echo "[$now] $1" | |
} | |
# pass command description | |
log_status() { | |
exitval=$? | |
if [ $exitval -eq 0 ]; then | |
log "$1 succeded" | |
else | |
log "$1 failed, exit value $exitval" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment