Consider the input:
=sec1= some-line some-other-line foo bar=baz =sec2= c=baz
If I wish to process only =sec1= I can for example comment
Another way would be
sed '/begin/,/end/ { /begin/n /end/ !p }'
/begin/n -> skip over the line that has the "begin" pattern /end/ !p -> print all lines that don't have the "end" pattern
/begin/n
/end/ !p
Taken from Bruce Barnett's sed tutorial http://www.grymoire.com/Unix/Sed.html#toc-uh-35a