Last active
September 12, 2017 07:05
-
-
Save techact/bcfd6e69ca38e239bee37e2e0593f70e to your computer and use it in GitHub Desktop.
Bash Date
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 | |
given_date="2016-09-21T10:28:41" | |
echo "$[$[$(date +%s)-$(date -d ${given_date} +%s)]/60/60/24] days" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment