I see there are ways to print lines between two search patterns, as explained here How to grep lines between start and end pattern?
sed -n '/aaa/,/cdn/p' file
awk '/test1/,/test2/'
I need negation of the above, and finding it hard to get the correct command/solution using the standard unix commands grep/sed/awk.
grep -v
excludes the lines matching the words, but not all the line between two specific regexs.
Any hints?