The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-16-2006
mitschcg mitschcg is offline
Registered User
 

Join Date: May 2006
Posts: 2
Question Date Calculations

I need to be able to use the current date and calculate 7 days ago to be stored in another variable to be passed to a file in my Unix shell script. I need the date in the following format:

date '+%m/%d/%Y'
or
05/16/2006

How do I calculate date minus 7 days or 1 week ago?
Reply With Quote
Forum Sponsor