title: Convert .txt to .csv in shell
body: <p>I have a text file:</p>
  
  <pre><code>ifile.txt
  1  4    22.0  3.3 2.3
  2  2    34.1  5.4 2.3
  3  2    33.0 34.0 2.3
  4 12     3.0 43.0 4.4
  </code></pre>
  
  <p>I would like to convert it to a csv file:</p>
  
  <pre><code>ofile.txt
  ID,No,A,B,C
  1,4,22.0,3.3,2.3
  2,2,34.1,5.4,2.3
  3,2,33.0,34.0,2.3
  4,12,3.0,43.0,4.4
  </code></pre>
  
  <p>I was trying with this, but not getting the result.</p>
  
  <pre><code>(echo "ID,No,A,B,C" ; cat ifile.txt) | sed 's/&lt;space&gt;/&lt;comma&gt;/g' &gt; ofile.csv
  </code></pre>