Thread
:
How to grep the date range
View Single Post
#
6
(
permalink
)
05-13-2008, 06:53 PM
agn
Member
User
Join Date: Feb 2008
My distro: OpenBSD/FreeBSD/Debian/Fedora/RHEL
Posts: 69
Rep Power:
1
Code:
egrep '((2[8-9]|3[0-1])/April|0[1-2]/May)/2008' logfile
If your data is ordered you might wanna use the sed instead of grep as the regex may get complex depending on your requirements.
agn
View Public Profile
Send a private message to agn
Find all posts by agn