you cannot compare MMDDYYYY,
but YYYYMMDD vs YYYYMMDD
loock around, there are a lot of threads playing
with split&&formating strings, computing date...
echo 07/20/04|sed -e 's/\(.*\)\/\(.*\)\/\(.*\)/\3\1\2/'
will transform 07/20/04 to 040720
and 040720 is now comparable to 040728
BUT this assume the input is exactly xx/xx/xx
the sed works, what if input is: 1/1/2004 vs 12/31/04
so:
- carefully check the input
- translate it to comparable strings
- compare the values