title: How to get column index of field in unix shell
body: <p>I have a csv file with headers:</p>
  <pre><code>a,b,c,d,e,f,g,h
  </code></pre>
  <p>I would like to do something</p>
  <pre><code>cat abc.csv | sed &quot;something to split them&quot; | grep &quot;e&quot;  
  
  #position of &quot;e&quot;
  </code></pre>
  <p>Can someone guide me how do I get the column idx of which header 'e' is at?</p>