How can I print the date which is a day before current time in Bash?
date -d "yesterday" '+%Y-%m-%d'
or
date=$(date -d "yesterday" '+%Y-%m-%d') echo $date