title: Creating a CSV file from a text file
body: <p>i have the below text file in this format</p>
  
  <pre><code>2015-04-21
  00:21:00
  5637
  5694
  12
  2015-04-21
  00:23:00
  5637
  5694
  12
  </code></pre>
  
  <p>I want to create a csv file like the below one-</p>
  
  <pre><code>2015-04-21,00:21:00,5637,5694,12
  2015-04-21,00:23:00,5637,5694,12
  </code></pre>
  
  <p>i used the tr and the sed like this-</p>
  
  <pre><code>cat file | tr '\n' ',' | sed 's/,$//'
  </code></pre>
  
  <p>It results in the below way-</p>
  
  <pre><code>2015-04-21,00:21:00,5637,5694,12,2015-04-21,00:23:00,5637,5694,12
  </code></pre>
  
  <p>but it doesn't have an new line after the column 5.</p>
  
  <p>Do suggest a solution.</p>