Reputation:
I need to do a grep count of a string with a filter condition .
The context is
Data will be genearetd in the below format in our log files
2013-05-17 10:06:40,693[qtp1957835280-12 Selector1] ERROR(CustomThread.java:<disconnect>:202)- onDisconnect: CustomThread [customerId=122, formattedId=testuser] reason : 1004, reasonMessage : closed
The log file is having data of all the previous days also (ie 17 , 16 , 15 , 14 , 13)
But i want to find the count of reason : 1004 for the present day that is 2013-05-17
If i execute grep -c 1004 application.log
its giving me the count of the previous daya also
Please let me know is it possible to get the count of 1004 for the current day only
Upvotes: 1
Views: 229