Get yesterday’s date in bash on Linux, DST-safe

I think this should work, irrespective of how often and when you run it …

date -d "yesterday 13:00" '+%Y-%m-%d'

Leave a Comment