Shell yesterday’s date
The date command in SH is pretty powerful. Here’s you can get yesterday’s date - something I find myself doing frequently for things like get data from an API for the last day, etc.
$ date +%Y-%m-%d --date=yesterday
2014-02-05