quick way to get yesterdays date

From: Shawn Bierman (BiermanS@METHODISTHEALTH.ORG)
Date: Tue Aug 05 2003 - 11:08:53 EDT


I tried something like this but if todays date is 05 it will return 4 instead of 04. Is there an existing method for doing this that I have overlooked?

DDATE=`date +%d`
DDATE=$((${DDATE} - 1))
echo ${DDATE}



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:07 EDT