| Newsgroups |
gmane.editors.sed.user |
| Message-ID |
<[email protected]> |
In our log files, we have some SQL output that looks roughly like:
DROP <more text>
ERROR
This 3 line sequence is seen throughout the log files, but we don't
care about these type of errors.
The first line if the 3-line pattern begins with DROP,
the second line is mostly but not necessarily empty (assume it can be any text),
the 3rd line begins with ERROR.
What I'd like to be able to do is make a copy of the log file,
the run sed to find any line that begins with DROP followed
by a line followed by a line that begins with ERROR, and remove
all 3 lines. Repeat that action for any match of this 3-line pattern.
This is on Linux using bash.
Thank for any help
[Non-text portions of this message have been removed]