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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I add a date to a unix file that is yesterday's date? 1

Status
Not open for further replies.

itsmythg

Technical User
Apr 4, 2001
34
US
I need to modify the name of a file to the variable of the date of the file, that date is always the day before the file was created as part of cron started job.
this is the script I am using.
echo `date '+%m%d'`| read mydate
cat pac | sed " s/$/ ${mydate} /g" > /xxxxx/pacct${mydate}
 
Have a look at this thread.

thread60-44282

Greg.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top