I have a requirement, where i need to grep from the logs which covers from date range 2011/03/25 to 2011/04/04 (YYMMDD).
I have done this with egrep command, seems to be working fine for me.
cat /var/log/messages | egrep "2011/03/2[6-9]|2011/03/3[0-1]|2011/04/0[1-4]"
I was looking for awk command which would make my life simple.
Below is the snippet of the log file ...
2011/04/01-12:15:00
2011/04/01-12:15:00
2011/04/01-12:15:00
2011/04/01-12:15:01
2011/04/01-12:15:01
2011/04/01-12:15:01
2011/04/01-12:15:01
2011/04/01-12:15:01
2011\/04...
. But I don't think you need to escape '/' in an egrep (at least on the version I use). Good luck!egrep "pattern..." /var/log/messages