need your help , I am stuck at some syntax error after applying sed, i need to pick 2-3 lines above including the section which i got after applying sed.
PLease help , Thanks in advance. here is my data
Line 1
Line 2
line 3
Line 4
Section_A
blah1
blah2
blah3
blah4
Section_B
Line 11
Line 12
line 13
Line 14
Output
line 3
Line 4
Section_A
blah1
blah2
blah3
blah4
Section_B
this is what i have tried so far.
sed -e '/Section_A/,/Section_B/p' test.txt
sed -e '/Section_A/1/,/Section_B/p' test.txt