My file is having the contents like this
AND1 (A) {
non : hafe
on: tc
ma : nite }
AND1 (B) {
non : hafe1
on: tc1
ma : nite1 }
AND1 (C) {
non : hafe3
on: tc2
ma : nite3 }
I have written a
sed script to search the patterns AND1(A) and AND1 (B) and delete the entire content in these Blocks including the Patters AND1 (A) and AND1 (B)
but to my surprise the whole file content is getting deleted
This is my
sed script
sed -n '/AND1 (A)/,/AND1 (B)/ { /non/d ;}'file > file1
My new file content should be
AND1 (C) {
non : hafe3
on: tc2
ma : nite3 }
but the whole file is getting deleted
Can someone give me advice ?