title: Tab separated values in awk
body: <p>How do I select the first column from the TAB separated string?</p>
  
  <pre><code># echo "LOAD_SETTLED    LOAD_INIT       2011-01-13 03:50:01" | awk -F'\t' '{print $1}'
  </code></pre>
  
  <p>The above will return the entire line and not just "LOAD_SETTLED" as expected.</p>
  
  <p>Update:</p>
  
  <p>I need to change the third column in the tab separated values.
  The following does not work.</p>
  
  <pre><code>echo $line | awk 'BEGIN { -v var="$mycol_new" FS = "[ \t]+" } ; { print $1 $2 var $4 $5 $6 $7 $8 $9 }' &gt;&gt; /pdump/temp.txt
  </code></pre>
  
  <p>This however works as expected if the separator is comma instead of tab.</p>
  
  <pre><code>echo $line | awk -v var="$mycol_new" -F'\t' '{print $1 "," $2 "," var "," $4 "," $5 "," $6 "," $7 "," $8 "," $9 "}' &gt;&gt; /pdump/temp.txt
  </code></pre>