awk - How to cat or echo everything between two words in a file -


How to cat or echo in a file between two words?

Example <<> <<>

Class = "post-text" itemprop = "text">

This can work for you (GNU sed):

  sed -n '/ ^ instance /, / ^ end / {// D; P} 'file   

or as stated by Glenn:

  sed -n' / ^ instance /, / ^ end / {/! p} 'file    

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -