Created
September 20, 2012 06:14
-
-
Save adamatan/3754229 to your computer and use it in GitHub Desktop.
Bash time difference
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
#!/bin/bash | |
# Based on http://www.cyberciti.biz/faq/shell-script-to-get-the-time-difference/ | |
START=$(date +%s) | |
# Do something useful | |
END=$(date +%s) | |
DIFF=$(( $END - $START )) | |
echo "Finished in $DIFF seconds." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment