replace part of different strings (perl, bash) -
i replace text in csv-file in several lines:
input:
any text,"texta, textb",any text ouput:
any text, texta; textb,any text (i.e.: substitute comma semicolon in case located between 2 quotation marks, , remove quotation marks)
i tried sed , wildcards texta , textb not able print texta , textb in output file. help!
$ sed -r 's/"([^"]+),([^"]+)"/\1;\2/g' file text,texta; textb,any text
Comments
Post a Comment