I have a two column file with a structure
1 2
10 1
10 1
10 3
102 40
102 40
25 5
53 4
53 4
35 6
64 5
456 4
456 4
243 535
435 6
So number above and below the blank row are same. But the blank row are not uniform (they are single, double or triple). I want to delete the number just after the each blank row and the blank row just above this number.
My expected output should be like this
1 2
10 1
10 3
102 40
25 5
53 4
35 6
64 5
456 4
243 535
435 6
I have tried to do this:
sed -e '/pattern/,+1d' input_file
You see my pattern is varying and I failed to solve the issue.