I am creating a shell script and have a question about how to determine yesterdays date. In my script, I can determine today by:
today=`date '+%Y%m%d'`
but I am not sure how to determine yesterday. In other languages, I would just subtract one from today, but I don't know how to do that here. Please understand that I do NOT want to change the system date, I just want to determine the date for yesterday in a YYYYMMDD format. Any help would be greatly appreciated.