Showing posts with label Log files. Show all posts
Showing posts with label Log files. Show all posts

Wednesday, October 16, 2013

Parsing big log file

Parsing big log file

1. Task

Task: I have big text file (which have size approx 2 GiB) and want to parse it. I want to find each entry of word "exception" and then print this line and next 9 lines. Also, this 10 lines can contain string:
 "stuff at begin of line At procedure '%PROCEDURE_NAME%' many many symbols in end of line" where words "At procedure" exists in the text constantly and %PROCEDURE_NAME% is text which I also want to find (without quotes if possible :) ).

So, let's try to solve this task :)