I need an easy way to figure out the date for "yesterday" in a script. This is easy enough to do with Perl but I can't use Perl for this script.

To get the seconds from Jan 1, 1970 I use the following command:

date +%s

I can then do some math to the output (subtracting (24 * 60 * 60)) to return yesterday's date but is there an easy way to translate the corresponding string of seconds back to a human readable date? The date command doesn't seen to do this for me, at least not that I can see.

Greg

_______________________________________________
TriLUG mailing list
   http://www.trilug.org/mailman/listinfo/trilug
TriLUG Organizational FAQ:
   http://www.trilug.org/faq/TriLUG-faq.html

Reply via email to