title: Combine multiple lines between flags in one line in AWK
body: <p>Example file:</p>
  <pre><code>Pattern 1
  
  AAAAAAAAAA
  BBBBBBBBBB
  
  Pattern 2
  </code></pre>
  <p>I want to print the lines between two patterns in a file in one line.
  From a previous question <a href="https://stackoverflow.com/questions/38972736/how-to-print-lines-between-two-patterns-inclusive-or-exclusive-in-sed-awk-or">How to print lines between two patterns, inclusive or exclusive (in sed, AWK or Perl)?</a> I found the very nice</p>
  <pre><code>awk '/Pattern 1/{flag=1; next} /Pattern 2/{flag=0} flag' file
  </code></pre>
  <p>With output:</p>
  <pre><code>AAAAAAAAAA
  BBBBBBBBBB
  </code></pre>
  <p>My desired output:</p>
  <pre><code>AAAAAAAAAABBBBBBBBBB
  </code></pre>