title: Replace multiple commas with a single one - linux command
body: <p>This is an output from my google csv contacts (which contains more than 1000 contacts):</p>
  
  <pre><code>A-Tech Computers Hardware,A-Tech Computers,,Hardware,,,,,,,,,,,,,,,,,,,,Low,,,* My Contacts,,,,,,,,,Home,+38733236313,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
  </code></pre>
  
  <p>I need a linux cli command to replace the duplicate commas, with single commas, so i get this:</p>
  
  <pre><code>A-Tech Computers Hardware,A-Tech Computers,Hardware,Low,* My Contacts,Home,+38733236313,
  </code></pre>
  
  <p>What I usually do in notepad++ is Replace ",," with "," six times. </p>
  
  <p>I tried with:</p>
  
  <pre><code>cat googlecontacts.txt | sed -e 's/,,/,/g' -e 's/,,/,/g' -e 's/,,/,/g'  -e 's/,,/,/g' -e 's/,,/,/g' -e 's/,,/,/g' &gt; google.txt
  </code></pre>
  
  <p>But it doesn't work...
  However, when I try it on smaller files (two lines) it works... :(</p>
  
  <p>Help please!</p>