Find all .txt & .log files modified today and display errors
Posted: 04 Jan 2014 22:00
Hey All,
I need to add a few lines to a script I am working on that will look at all .txt and .log files in a folder that were modified today and display all lines in the files that contain the text | ERROR |. For example it would look like the following....
I can do this manually one by one to each file, but do not know how to have it do this automatically for all files modified today. Any help would be amazing!
I need to add a few lines to a script I am working on that will look at all .txt and .log files in a folder that were modified today and display all lines in the files that contain the text | ERROR |. For example it would look like the following....
File1.txt:
04/01/14 20:28:02.663 | ERROR | 29 | Error123456...
04/01/14 21:28:02.748 | ERROR | 29 | ErrorXYZ...
File2.log:
04/01/14 22:28:02.849 | ERROR | 29 | Errorzyx....
04/01/14 16:52:11.935 | ERROR | 91 | ErrorABC....
04/01/14 09:52:01.191 | ERROR | 3 | Error1234....
I can do this manually one by one to each file, but do not know how to have it do this automatically for all files modified today. Any help would be amazing!