General discussion

Locked

Date comparison in AIX 5

By stevelil ·
[ (${lastrundate} + 7) -ge ${currentdate} ]

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by Gary_W In reply to Date comparison in AIX 5

lastrundate is really an integer, not a date. You need to do date math (which will allow for leap years, wrapping around months, etc.

Check this link out for a korn shell version:
http://www.samag.com/documents/s=8284/sam0307b/0307b.htm

There is a typo in the get_greg_from_JD function. there is an errant 'm' which it seems can be deleted from this line:
J=$((80*L/2447)m)

There are some perl scripts out there too if you do a little searching.

Gary

Collapse -

by stevelil In reply to

Poster rated this answer.

Collapse -

by stevelil In reply to Date comparison in AIX 5

This question was closed by the author

Back to Linux Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums