I want to know how to calculate date-n where date is systems current date and N is number of days i want to add or subtract.
I am able to do get yesterday's date but dont know how to add or subtract no of days to get desired date :
date_dir=`date +%Y-%m-%d -d yesterday` echo "$date_dir" Thanks