I am using following sed rule to delete 2 lines after a pattern match inclusive.
[root@server ~]# cat /tmp/temp.txt
dns.com
11
22
mydns.com
11
22
dns.com.au
11
22
LAST LINE
[root@server ~]# cat /tmp/temp.txt | sed -e '/dns.com/,+2d'
LAST LINE
I just need to remove lines below dns.com only and NOT below other domains. The rule I am using deletes lines below mydns.com and dns.com.au