title: Concatenate strings in awk
body: <p>I have a log file which I need to "replay" on the server.</p>
  
  <p>It contains entries like this:</p>
  
  <pre><code>Request:
          query: EXEC prc_insert_customer
          @param0: 110040851
          @param1: 137463
          @param2: user@example.com
          @param3: John
          @param4: Smith
          @param5: Some address
          @param6:
          @param7:
          @param8: Some city
          @param9: GBR
          @param10: POSTCODE
          @param11: (555) 123-45-67
  Response:
  
  ...
  </code></pre>
  
  <p>I need to convert each chunk like that into</p>
  
  <pre><code>EXEC prc_insert_customer '110040851', '137463',  ..., '(555) 123-45-67'
  </code></pre>
  
  <p>I tried to use awk for that:</p>
  
  <pre><code>/EXEC prc_insert_customer/ {
          str = "EXEC prc_insert_customer";
  }
  
  str &amp;&amp; /@param/ {
          if ($1 == "@param0:")
                  sep = ""
          else
                  sep = ","
          str = ((str) (sep) " '"($2) ("'"))
  }
  
  /^Response/ {
          if (str)
                  print str
          str = ""
  }
  </code></pre>
  
  <p>but the output I get is:</p>
  
  <pre><code>', '(555)'DE', '', 'Some', 'GBR0851
  </code></pre>
  
  <p>How do I get correct output?</p>
  
  <p>I use <code>GNU Awk 4.0.0</code> on <code>Fedora 17</code>.</p>