Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

sed delete between two patterns

sed '/start/,/end/d' myfile # include start & end pattern
sed -n '1,/start/p;/end/,$p' myfile # only delete between patterns
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sed #delete #patterns
ADD COMMENT
Topic
Name
3+2 =