-   AIX (
-   -   date comparision (

rajachan 01-29-2013 11:29 PM

date comparision
hi ..

i need to do ksh script to compare two dates.

one date is from file which have output like below

second date should be 15 days before the current date.
for ex: if currrent date is 30 jan... second date should be 15 jan

now i have to compare these two dates.

if 11-JAN-13 >second date then
echo "output is date is recent(less than 15 days)
echo "not recent)"

unSpawn 01-30-2013 12:45 PM

Half of this question was answered here already: and for the comparison part converting dates to epoch is probably the easiest. See 'man date'?

All times are GMT -5. The time now is 12:34 PM.