Quick tip for working with Unix scripts that need yesterday’s date. If you have Perl, try this:
should print to stdout the date in the yyyymmdd format. Much simpler than writing an entire function in a script and messing around with 1st of the month, leap years, and possibly dates beyond 2037 (check Perl documentation).
The UNIX Forums – get yesterday in yyyymmdd format
- Print Unix File Timestamp Accurate Down to Seconds
- Blogger.com Template Tip: Render Previous Post Link At Bottom Of Main Page
- Perform Satistical Operations on Columns in CSV Files