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!

date manipulation and filename

Status
Not open for further replies.
Aug 3, 2001
29
US
I am in need of pointers or help.
I am setting up in ksh script
two filenames, one with current date = dttm attached at the end of a variable to designate file (tmsmtp=/dir/.filename$dttm)
I need to setup2nd file name with date manipulated less 10 minutes (tmsmtp1=/dir/.filename$dttm??)

anyone have a solution. I've tried and can't seem to get it correct.


Thanks,

Len
 
If you have GNU's version of the "date" command:

date -d "10 minutes ago"
 
I am using AIX 4.3 and the date -d "10 minutes ago" won't work here. I normally use var=`date + format` to setup
what I need is to subtract time and apply it to variable.


Thanks,

Len
 
AIX's version of date is primitive and annoying at times.

There's not going to be an easy way of scripting it - you'll have to subtract the time yourself and write all of the logic to roll back other parts of the date/time.

Or you can visit the Bull software archive and install GNU's date (I did).

- an aix admin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top