Skip to content

Instantly share code, notes, and snippets.

@deckerego
Created December 6, 2013 16:56
Show Gist options
  • Save deckerego/7828220 to your computer and use it in GitHub Desktop.
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...
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