0

I have a line, that looks like this.

Das,Dwda,3145124,4,"7,5",6,"7,5",6,8,7,51,"5,5",10,17,"83,5"

I want to change all commas inside double quotes to a period with some command in bash like awk or sed.

  • 1
    what did you try so far? The two top-most related answers are pretty close. – pLumo Jul 19 '18 at 09:13
  • Also note that after replacing commas with dots, the quotes are no longer needed in CSV. – choroba Jul 19 '18 at 09:21
  • Yes, that I am aware, but removing the quotes is easy. Right now I am struggling to understand this sed -r ':a;s/(("[0-9,]*",?)*"[0-9,]*),/\1/;ta; s/""/","/g;, which was a top comment from another answer, but I am not sure how to adapt that, not to remove the commas, but to replace the comma with a dot EDIT: didn't copy the whole line – jacktorrancee Jul 19 '18 at 09:33

0 Answers0