Last active
October 21, 2015 02:38
-
-
Save jaredmichaelwilliams/d5673f787a53f2be926f to your computer and use it in GitHub Desktop.
Time elapsed in minutes and seconds since date on OS X - use with `watch` for updating clock
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
date1=$(date -j -f "%b %d %T %Z %Y" "Oct 20 21:00:00 EDT 2015" "+%s") date2=$(date +%s) diff=$(($date2-$date1)) ; echo "$(($diff / 60)) minutes and $(($diff % 60)) seconds elapsed." | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment