How can I print the date which is a day before current time in Bash?
If you have BSD (OSX) date you can do it like this:
date
date -j -v-1d Wed Dec 14 15:34:14 CET 2011
Or if you want to do date calculations on an arbitrary date:
date -j -v-1d -f "%Y-%m-%d" "2011-09-01" "+%Y-%m-%d" 2011-08-31