I've used sed
to print all lines starting from one pattern ending in another:
Lets say file1
contents are these:
outside-text1
==START
inner-text1
==END
outside-text2
==START
inner-text2
==END
The command:
sed -n '/==START/,/==END/p' file1
will print :
==START
inner-text1
==END
==START
inner-text2
==END
In my case I would like to print:
outside-text1
outside-text2