If you want to print everything from “section B” to “section C”, including these lines,
sed -ne '/^section B/,/^section/p'
If you do not want to print two lines of a section,
sed -e '1,/^section B/d' -e '/^section/,$d'
If you want to include “section B” and the closing bracket (but not “section C”),
sed -ne '/^section B/,/^)/p'
And there are a few more options.
source
share