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
 
2
Kudos
 
2
Kudos

Now read this

Hive and Hadoop Command Snippet search

Why? # I’ve found myself looking up the “exact” syntax for DML / DDL in Hive countless times. Also, I tend to forget the list of date functions and parameters. I would use a combination of Google Search and/or a cheat sheet for these.... Continue →