input.txt
:
blah1
blah2
start_pattern
blah3
blah4
blah5
end_pattern
blah6
blah7
I would like input.txt
to become:
blah1
blah2
end_pattern
blah6
blah7
I tried the following, but it didn't work.
sed -i "/start_pattern/, /end_pattern/{$!d}" input.txt