Tag: perl
Print Yesterday’s Date Using Perl
by lokety on Dec.22, 2006, under Posts
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).
Links:
The UNIX Forums – get yesterday in yyyymmdd format
<URL:http://www.unix.com/showthread.php?t=20181>
Technorati Tags: unix, programming, script, perl, yesterday’s date

Comments