title: awk prints unnecessary new line in output
body: <p>I am trying to create csv file from the below data(Elasticsearch data)</p>
  <pre><code>health status index                                                uuid                   pri rep docs.count docs.deleted store.size pri.store.size
  green  open   78_data_store-2021.12.12                              cYZDB7NGQbyowP-WyF99Zw   1   1    5438232            0      8.3gb          4.1gb
  green  open   78_data_store-2021.12.24                             RWrhN4QKT2OlbP4MB7CYmw   1   1     663431            0    745.3mb        372.6mb
  green  open   78_data_store-2021.11.26                              CivwBCtAROCejmpZ6RaXOA   1   1     989983            0    956.5mb        478.2mb
  </code></pre>
  <p>I want below output (<strong>Expected output</strong>)</p>
  <pre><code>78,78_data_store-2021.11.26,2021.11.26,1,1,478.2mb
  78,78_data_store-2021.12.12,2021.12.12,1,1,4.1gb 
  78,78_data_store-2021.12.24,2021.12.24,1,1,372.6mb
  </code></pre>
  <p>But when I am using below command I got unnecessary new line in output</p>
  <pre><code>cat filename | grep &quot; 78_&quot; | sort -k 3 | awk '{split($3,a,&quot;_&quot;);print a[1];split($3,a,&quot;-&quot;); print &quot;,&quot;  $3 &quot;,&quot; a[2] &quot;,&quot; $5 &quot;,&quot; $6 &quot;,&quot; $10}'
  </code></pre>
  <p><strong>output of this command</strong></p>
  <pre><code>78
  ,78_data_store-2021.11.26,2021.11.26,1,1,478.2mb
  78
  ,78_data_store-2021.12.12,2021.12.12,1,1,4.1gb
  78
  ,78_data_store-2021.12.24,2021.12.24,1,1,372.6mb
  </code></pre>
  <p>What is the missing in the command?</p>