title: awk to combine all lines in file with another
body: <p>The below <code>awk</code> combines the target.txt with the out_parse.txt and the output is GJ-53.txt. If there are multiple lines in out_parse how can they both be written to GJ-53.txt? As of now  the first line of <code>out_parse</code> saves to a text file <code>GJ-53</code>, but the second line does not.  Than you :).</p>
  
  <pre><code>awk '{close(fname)} (getline fname&lt;f)&gt;0 {print&gt;fname}' f=target.txt out_parse.txt
  </code></pre>
  
  <p><strong>Contents of out_parse.txt</strong></p>
  
  <pre><code>13  20763612    20763612    C   T
  13  20763620    20763620    A   G
  </code></pre>
  
  <p><strong>Contents of target.txt</strong></p>
  
  <pre><code>GJ-53.txt
  
   cat -v out_parse.txt
   13      20763612        20763612        C       T
   13      20763620        20763620        A       G
  </code></pre>