How to print X days ago date in bash


This is particularly useful when you are looking for the date of a specific number of days ago, regardless of week or month .
Example, to print the date that is 10 days ago:
Code:
date  --date="10 days ago"

Example, to print the date that is 30 days ago:
Code:
date  --date="30 days ago"

Example, to print the date that is 5 days ago:
Code:
date  --date="5 days ago"