title: Fixed width to CSV
body: <p>I know how to use <code>awk</code> to change fixed width to CSV. What I have is a hard drive with a few thousand fixed width files. The all contain different column width formats, but it is "encoded" on the second line as:</p>
  
  <pre><code>Name           DOB      GENDER
  ============== ======== ======
  JOHN DOE       19870130 M
  MARY DOE       19850521 F
  MARTY MCFLY    19790320 M
  </code></pre>
  
  <p>I want to convert ALL the files to CSV. I can write a program that reads in the first line and holds it for column names. Then, it loads the second line to get the column widths. Then, it uses <code>awk</code> to convert that file to CSV. What I'd prefer to do is find a program that automatically does that (can awk read the second line instead of requiring me to type in the column widths?)</p>