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.

marked as duplicate by Kusalananda bash Jul 19 '18 at 9:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    what did you try so far? The two top-most related answers are pretty close. – pLumo Jul 19 '18 at 9:13
  • Also note that after replacing commas with dots, the quotes are no longer needed in CSV. – choroba Jul 19 '18 at 9: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 – Mladia Jul 19 '18 at 9:33

Browse other questions tagged or ask your own question.