title: How to select lines between two marker patterns which may occur multiple times with awk/sed
body: <p>Using <code>awk</code> or <code>sed</code> how can I select lines which are occurring between two different marker patterns? There may be multiple sections marked with these patterns.</p>
  
  <p>For example: 
  Suppose the file contains: </p>
  
  <pre><code>abc
  def1
  ghi1
  jkl1
  mno
  abc
  def2
  ghi2
  jkl2
  mno
  pqr
  stu
  </code></pre>
  
  <p>And the starting pattern is <code>abc</code> and ending pattern is <code>mno</code>
  So, I need the output as: </p>
  
  <pre><code>def1
  ghi1
  jkl1
  def2
  ghi2
  jkl2
  </code></pre>
  
  <p>I am using sed to match the pattern once: </p>
  
  <pre><code>sed -e '1,/abc/d' -e '/mno/,$d' &lt;FILE&gt;
  </code></pre>
  
  <p>Is there any way in <code>sed</code> or <code>awk</code>  to do it repeatedly until the end of file? </p>