bash script help: how to find mm-dd-yy of seven days ago?

Chris W. Parker cparker at swatgear.com
Thu Nov 4 23:00:26 UTC 2004


Paul Guglielmino <mailto:paulg at ccs.neu.edu>
    on Thursday, November 04, 2004 2:01 PM said:

> When using GNU date you can do something like this:
> 
> date -d +%m-+%d-+%y --date '7 days ago'
> 
> The date program will do the calculations for you. Hope that helps.

awesome! thanks!


chris.




More information about the redhat-list mailing list