3列示例文件:
"Mahavir", "Sachin" is boy" , "Ankita"
"abc" , "xyz" is girl" , "uvw"
所需的输出:
"Mahavir" , "Sachin is boy , "Ankita"
"abc" , "xyz is girl , "uvw"
在这里,我要删除您在sachin和xyz附近看到的不必要的双引号。
最佳答案
awk -F "," '{gsub(/"( *)$/,"\\\1",$2); print $1","$2","$3}' file
关于linux - 从字符串中删除不需要的双引号,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/44514863/