I have a file with data records separated by multiple equals signs, as below.
==========
RECORD 1
RECORD 2
DATA LINE
RECORD 3
RECORD 4
DATA LINE
RECORD 5
DATA LINE
I need to filter out all data from this file where the record has no data lines. So in the example above, I would need RECORD 1 and RECORD 3 to be filtered out, plus the extra rows of equals signs separating them. So I would like the output to be:
==========
RECORD 2
DATA LINE
RECORD 4
DATA LINE
RECORD 5
DATA LINE
I can get done whan I need on single lines, but I am stuck trying to match the pattern over multiple lines, and then deleting multiple lines.