Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

grep show lines between matches

Just use following structure to get result between two different patterns:
sed -n '/^pattern1/,/^pattern2/p;/^pattern2/q' file.txt
 
PREVIOUS NEXT
Tagged: #grep #show #lines #matches
ADD COMMENT
Topic
Name
4+9 =