I am trying to grep a file with invert match, but also not match every line occurring right after the matching lines.
So I have the following contents in a file called
aaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbb cccccccccccccccccc dddddddddddddddddd llllllllllllllllll dddddddddddddddddd llllllllllllllllll fffffffffffffffff fffffffffffffffff
So I want to match all lines except the ones containing
d and the next line following such a match, so I have the following
grep -v "d" -A 1 testing_grep.txt
However, I still get all lines being outputed while all I need is the following output:
aaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbb cccccccccccccccccc fffffffffffffffff fffffffffffffffff
Thanks for any help.