If a log file is in the following format
28-Jul-10 ::: Log message
28-Jul-10 ::: Log message
29-Jul-10 ::: Log message
30-Jul-10 ::: Log message
31-Jul-10 ::: Log message
31-Jul-10 ::: Log message
1-Aug-10 ::: Log message
1-Aug-10 ::: Log message
2-Aug-10 ::: Log message
2-Aug-10 ::: Log message
4-Aug-10 ::: Log message
4-Aug-10 ::: Log message
How can we delete only the lines which are having date/time entries, which are 2 days earlier from today's date..?
eg:
In this log, i only need to keep till 2 dates from today2-Aug-10 ::: Log message
2-Aug-10 ::: Log message
4-Aug-10 ::: Log message
4-Aug-10 ::: Log message
and delete the rest of the lines before that.