title: Print column contents by column name
body: <p>I want to input a string name (i.e. &quot;COL2&quot;) to an awk or cut command and print the column that matches that column header string.</p>
  <p>the datafile looks like this:</p>
  <pre><code>COL1 COL2 COL3 COL4 COL5 COL6
  a a b d c f
  a d g h e f
  c v a s g a
  </code></pre>
  <p>If I pass in COL3, I want it to print the third column, etc. I'm thinking awk might be the easiest thing to use, but cut may also work. I'm just not sure how to go about doing this.</p>