how to print all lines between "section B (" To the next "section" word that begin in line?
section A (
. .
)
section B (
. .
)
section C (
. .
)
sed -n '
/^section B/!n;
/^section B/d;
/^)/q;
p
' yourfile
Explanation of the above sed script, in steps:
!
start with section B
move to the next line.section B
text line.)
we quit.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With