Example:
a43 test1 abc cvb bnm test2 kfo
I need all lines between test1 and test2. Normal grep does not work in this case. Do you have any
You could use sed:
sed
sed -n '/test1/,/test2/p' filename
In order to exclude the lines containing test1 and test2, say:
test1
test2
sed -n '/test1/,/test2/{/test1/b;/test2/b;p}' filename