In my company, we have a huge log file with java stacktraces. In general, its format is:
useful line 1
useful line 2
useful line 3
MARKER1 start of exception
... <--Around 100 lines here
end of exception MARKER2
useful line 4
useful line 5
useful line 6
MARKER1 start of exception
... <--Around 100 lines here
end of exception MARKER2
useful line 7
It has useful information mixed with useless exceptions.
Is it possible to filter out the entire contents of useless exceptions from the logs using a combination of awk/sed/grep..?
In the example above, the output would be:
useful line 1
useful line 2
useful line 3
useful line 4
useful line 5
useful line 6
useful line 7
Thanks.