Example:
a43
test1
abc
cvb
bnm
test2
kfo
a43
test1
abc
cvb
bnm
test2
kfo
a43
test1
abc
cvb
bnm
test2
kfo
i need to find all lines between first occurence of test1 and test2. Below grep command does not work for this :
grep -A100000 test1 file.txt | grep -B100000 test2 > new.txt
can you please let me know if any modifications are needed to do the same?