Michael F. Robbins on Mon, 25 Mar 2002 20:20:16 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] Shell script quickie: yesterday's date


For you shell scripting wizards out there...  I need a script that will
simply echo yesterday's date.  This should be according to local time,
not GMT.  For example, if run today, it should simply echo "20020324". 
I've been playing with the 'date' command, and `date +%Y%m%d` gives
exactly what I want, except with today's date.  I think the '-d' option
is useful, but I'm not sure what the argument should be. 

Ah, it feels good to be back on PLUG, with my mail server now running
debian...  Goodbye, rpm dependencies! 

Michael F. Robbins 
mike@gamerack.com

Attachment: signature.asc
Description: This is a digitally signed message part