Created
December 6, 2013 16:56
-
-
Save deckerego/7828220 to your computer and use it in GitHub Desktop.
To print yesterday's date using a single line, or populate a script variable...
This file contains hidden or 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
date +%Y-%m-%d --date="@$[`date +%s` - 86400]" | |
DATE=$(date +%Y-%m-%d --date="@$[`date +%s` - 86400]") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment