perl -i -pe '(1==$. or eof) && s/,,+/,/' file_name [download]
In reply to Re^3: Find & Replace by sh1tn in thread Find & Replace by mantra2006