Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use date command to find last weeks mmddyy

Status
Not open for further replies.

kozlow

MIS
Mar 3, 2003
326
US
Is there a way to use the date command to give me the date from 8 days ago.

Say it is Monday July 2, I would want it to return June 25.

I thought I had this working at one time, but cannot find my test script...

 
gnu's version of date does this with the -d flag. AIX's date command doesn't do it.
 
PHV has one of the neatest bits of scripting I've ever seen to solve this. details at faq80-4800

Ceci n'est pas une signature
Columb Healy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top