"yesterdate" function?
Stu Heiss
stu at jpusa1.UUCP
Thu Jan 5 15:48:17 AEST 1989
In article <3562 at emory.uucp> arnold at emory.UUCP (Arnold D. Robbins {EUCC}) writes:
-In article <19100001 at hpficad.HP.COM> mcr at hpficad.HP.COM (Matt Reprogle) writes:
->I need a way to get yesterday's date in YYMMDD format in a Unix script and put
->it in a file. I don't want to write a C program implementing an entire
->calendar to do it.
->
->Can anyone help?
-
-This is too hard to pass up.
-[short c program deleted]
add 24 to your tz offset (example 6 for cdt; 6+24=30) and do
$ TZ=30 date +%y%m%d
if you don't know your tz offset do:
$ echo $TZ
--
Stu Heiss {gargoyle.uchicago.edu,uunet.uu.net,spl1,ddsw1}!jpusa1.uucp!stu
More information about the Comp.unix.questions
mailing list