SyntaxFix
Write A Post
Hire A Developer
Questions
This might work for you (GNU sed):
sed '/^abc$/,/^mno$/{//!b};d' file
Delete all lines except for those between lines starting abc and mno
abc
mno