title: How can I trim white space from a variable in awk?
body: <p>Suppose $2 is my variable.  I have tried going from</p>
  
  <pre><code>awk -F\, '{print $2 ":"}'
  </code></pre>
  
  <p>to </p>
  
  <pre><code>awk -F\, '{print gsub(/[ \t]+$/, "", $2) ":"}'
  </code></pre>
  
  <p>But it goes from printing something to printing nothing at all.</p>