I\'m trying to find all lines between a date range in a file. However dates are formatted in a non standard way. Is there a way for awk to read these? The log file is format
$ cat tst.awk
{
mthNr = (index("JanFebMarAprMayJunJulAugSepOctNovDec",$1)+2)/3
date = sprintf("%02d%02d", mthNr, $2)
}
(date >= from) && (date <= to)
$ awk -v from='0101' -v to='0210' -f tst.awk file
Jan 5 11:34:00 log messages here
Jan 13 16:21:00 log messages here
Feb 1 01:14:00 log messages here
Feb 10 16:32:00 more messages
Massage to suit...