title: use awk to print a column, adding a comma
body: <p>I have a file, from which I want to retrieve the first column, and add a comma between each value.</p>
  
  <p>Example:</p>
  
  <pre><code>AAAA 12345 xccvbn
  BBBB 43431 fkodks
  CCCC 51234 plafad
  </code></pre>
  
  <p>to obtain</p>
  
  <pre><code>AAAA,BBBB,CCCC
  </code></pre>
  
  <p>I decided to use awk, so I did</p>
  
  <pre><code>awk '{ $1=$1","; print $1 }'
  </code></pre>
  
  <p>Problem is: this add a comma also on the last value, which is not what I want to achieve, and also I get a space between values.</p>
  
  <p>How do I remove the comma on the last element, and how do I remove the space? Spent 20 minutes looking at the manual without luck.</p>