How can I print the date which is a day before current time in Bash?
Sorry not mentioning I on Solaris system. As such, the -date switch is not available on Solaris bash.
I find out I can get the previous date with little trick on timezone.
DATE=`TZ=MYT+16 date +%Y-%m-%d_%r` echo $DATE
if you have GNU date and i understood you correctly
$ date +%Y:%m:%d -d "yesterday" 2009:11:09
$ date +%Y:%m:%d -d "1 day ago" 2009:11:09