title: How to place comma between fields with single quote using awk
body: <p>I have tried with following awk but it didn't work as expected.</p>
  
  <pre><code>awk -v q="," '{ f1=$1; $1=""; print f1, q substr($0,2) q}' input.dat &gt; output.dat
  </code></pre>
  
  <p>Input data</p>
  
  <pre><code>12123 'QA test case 1' 'QA environment'   
  12234 'UAT test case 1' 'UAT environment'  
  </code></pre>
  
  <p>Expected output </p>
  
  <pre><code>12123, 'QA test case 1', 'QA environment'   
  12234, 'UAT test case 1', 'UAT environment' 
  </code></pre>