title: How to awk pattern over two consecutive lines?
body: <p>I am trying do something which I guess could be done very easy but I cant seem to find the answer. I want to use awk to pick out lines between two patterns, but I also want the pattern to match two consecutive lines. I have tried to find the solution on the Internet bu perhaps I did not search for the right keywords. An example would better describe this.</p>
  
  <p>Suppose I have the following file called test:</p>
  
  <pre><code>aaaa
  bbbb
  
     SOME CONTENT 1
  
  ddddd    
  fffff
  
  
  aaaa    
  cccc
  
      SOME CONTENT 2
  
  ccccc    
  fffff
  </code></pre>
  
  <p>For example lets say I would like to find "SOME CONTENT 1"</p>
  
  <p>Then I would use awk like this:</p>
  
  <pre><code>  cat test | awk  '/aaa*/ { show=1} show; /fff*/ {show=0}'
  </code></pre>
  
  <p>But that is not want I want. I want somehow to enter the pattern: </p>
  
  <pre><code>  aaaa*\nbbbb*
  </code></pre>
  
  <p>And the same for the end pattern. Any suggestions how to do this?</p>