I have a file that looks something like this:
good text good text FLAG bad text bad text good text good text good test bad Text FLAG bad text bad text good text
I need to delete any line containing "FLAG", and I always need to delete one line immediately after the line "FLAG".
"FLAG" lines are found quite irregularly, and I can not rely on any strategy with line numbers.
Does anyone know how to do this with sed?
source share