I need to do date arithmetic in Unix shell scripts that I use to control the execution of third party programs.
I\'m using a function to increment a day and another
date --date='1 days ago' '+%a'
It's not a very compatible solution. It will work only in Linux. At least, it didn't worked in Aix and Solaris.
It works in RHEL:
date --date='1 days ago' '+%Y%m%d' 20080807