title: How can I split csv file into separate files with header row and 1 line of data
body: <p>How can I split csv file into files with header row and 1 line of data.  I was planning on using AWK, but any alternatives of course gratefully received.  I want to split a csv file into single row files (with header row).  For example, I want to take something like this:-</p>
  
  <pre><code>FirstName, Age, Sex
  John,45,Male
  Paul,24,Male
  Mark,87,Male
  Sue,29,Female
  </code></pre>
  
  <p>And produce four files that look like this:-</p>
  
  <p>File 1:</p>
  
  <pre><code>FirstName, Age, Sex
  John,45,Male
  </code></pre>
  
  <p>File 2:</p>
  
  <pre><code>FirstName, Age, Sex
  Paul,24,Male
  </code></pre>
  
  <p>etc....</p>