How to get 10 days back date by giving one date as parameter to the shell script -


if give date "20130828"(not current date) in yyyymmdd format, how can 10 days date using shell script i.e. 20130818
in advance!

try

date +%y%m%d --date="20130818 -10 day" 

or even

date +%y%m%d --date="20130818 10 days ago" 

+%y%m%d format of date (yyyymmdd), , through --date can provide string (in human readable format) specify when want date.


Comments

Popular posts from this blog

design - Custom Styling Qt Quick Controls -

Unable to remove the www from url on https using .htaccess -