Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

grab between two patterns

sed '/start_pattern_here/,/end_pattern_here/!d' inputfile

 awk '$0=="pattern1" {p=1}; p; $0=="pattern2" {p=0}' file
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #grab #patterns
ADD COMMENT
Topic
Name
5+9 =