LANG=C sed 's/,/\\,/g' input.dat > input.dat LANG=C sed 's/::/,/g' input2.dat > output.csv