Obtaining yesterday's date

sunhux G sunhux at gmail.com
Sun Jan 30 04:54:47 UTC 2011


I'm trying to get yesterday's date in YYYYMMDD format.

Anyone know if RHES 4.x has GNU date that allows
yesterday=$(date -d "-1 day" '+%Y%m%d')



& if there's no GNU date, how do we go about obtaining it?



Thanks

Sun



More information about the redhat-list mailing list