我有一个简单的要求,我输入了likeL
4,23139,,"XYZ"
在文本文件中,我需要像这样的输出
"4","23139","","ARCMsgEnum".
在某些情况下,我编写的命令可以正常工作:
sed 's/[0-9]*[0-9]/"&"/g' inputTestData.txt | sed s/,,/,\"\",/g
但是有些行输入为时间戳:
4,23139,,"XYZ","2008-09-04 08:11:33.51 AM"
所以想要的输出是:
"4","23139","","XYZ","2008-09-04 08:11:33.51 AM"
但上面的命令给了我这样的输出:
"4","23139","","XYZ",""2008"-"09"-"04" "08":"11":"33"."46" AM"