title: Convert CSV to TSV
body: <p>How do you convert this csv file into a tab delimited file?</p>
  
  <pre><code>"Country","Percent","Percent of patients","home health","home health agency","friends and family","Surveys","Response"
  "Nation","88","85","83","84","78",,
  </code></pre>
  
  <p>Notice both the Surverys and Response columns are empty strings.</p>
  
  <p>I use this code to convert it to a tab file - </p>
  
  <pre><code>sed 's/\"\,\"/\"\t\"/g'
  sed 's/\,\,/\t""\t/g'
  </code></pre>
  
  <p>It doesn't convert the last column though. This is the output I get (Notice the last column is omitted) - </p>
  
  <pre><code>"Country"   "Percent"   "Percent of patients"   "home health"   "home health agency"    "friends and family"    "Surveys"   "Response"
  "Nation"        "88"    "85"    "83"    "84"    "78"    ""
  </code></pre>
  
  <p>There are 8 columns in the header and only 7 columns in the tab delimited data, so the last column is missed.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>My column names have commas in them. </p>