仅删除双引号中出现的逗号
在文本文件中,我要删除,(逗号)以及"(引号)(仅当双引号包含以逗号分隔的数字时)。 56,72,"12,34,54",x,y,"foo,a,b,bar" 预期产量 56,72,123454,x,y,"foo,a,b,bar" 注意:我仅以示例的方式显示上述行。我的文本文件包含很多行,如上,双引号中用逗号分隔的数字应有所不同。那是, 56,72,"12,34,54",x,y,"foo,a,b,bar" 56,92,"12,34",x,y,"foo,a,b,bar" 56,72,"12,34,54,78,76,54,67",x,y,"foo,a,b,bar" 56,72,x,y,"foo,a,b,bar","12,34,54" 56,72,x,y,"foo,a,b,bar","12,34,54","45,57,84,92","bar,foo" 预期产量: 56,72,123454,x,y,"foo,a,b,bar" 56,92,1234,x,y,"foo,a,b,bar" 56,72,12345478765467,x,y,"foo,a,b,bar" 56,72,x,y,"foo,a,b,bar",123454 56,72,x,y,"foo,a,b,bar",123454,45578492,"bar,foo" n在双引号中有许多数字,用逗号分隔。并且还要保留包含字符的双引号。 我喜欢sed文字处理工具。如果您sed对此提出任何解决方案,我感到很高兴。