We have a error log directory structure wherein we store all errors log files for a particular day in datewise directories -
errorbackup/20150629/errorlogFile3453123.log.xml errorbackup/20150629/errorlogFile5676934.log.xml errorbackup/20150629/errorlogFile9812387.log.xml errorbackup/20150628/errorlogFile1097172.log.xml errorbackup/20150628/errorlogFile1908071_log.xml errorbackup/20150627/errorlogFile5675733.log.xml errorbackup/20150627/errorlogFile9452344.log.xml errorbackup/20150626/errorlogFile6363446.log.xml
I want to search for a particular string in the error log file and get the output such that I will get directory wise search result of a count of that string s occurrence. For example grep "blahblahSQLError" should output something like-
20150629:0 20150628:0 20150627:1 20150626:1
This is needed because we fixed some errors in one of the release and I want to make sure that there are no occurrences of that error since the day it was deployed to Prod. Also note that there are thousands of error log files created every day. Each error log file is created with a random number in its name to ensure uniqueness.