Say we got an example file:
11
12
ss
dd
gg
32
ss
dd
gg
So i want to remove the block which meet the pattern ss gg, but i want to keep the start pattern ss
The out put should be
11
12
ss
32
ss
Using this code
awk '/ss/,/gg/{next}1' file
It also excludes the start pattern ss
. How could we keep it?