Date comparisons ...
how can i compore date in linux....using timestamps
|
how can i compare 10/01/2009 with current date
|
Read this to see how to get current date in required format http://linux.die.net/man/1/date, then split each string using either bash built-ins or eg cut or awk and compare each field separately.
Show us your code if you get stuck. |
Comparing dates is best done using timestamps. Refer to the man page chrism01 gave you. Convert a date to a time stamp and do the arithmetic.
jlinkels |
All times are GMT -5. The time now is 05:29 AM. |