How can I print the date which is a day before current time in Bash?
if you have GNU date and i understood you correctly
$ date +%Y:%m:%d -d "yesterday" 2009:11:09
or
$ date +%Y:%m:%d -d "1 day ago" 2009:11:09
2.1m questions
2.1m answers
60 comments
57.0k users