Displaying yesterdays date in solaris

Sounds like a daft thing to do i know but for a couple of my scripts this is needed

# echo `TZ=GMT+24 date +"%D"`
This method doesnt always work, depends on what time of day you call this. I have also found a perl method of doing this as well
# perl -e '($d,$m,$y)=(localtime(time-86400))[3..5];$m+=1;$y+=1900;print "$m/$d/$yn";'

Share