linux 中 awk命令如何输出双引号和单引号
001、双引号
[root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt 1 2 3 4 5 [root@PC1 test]# awk '{print $0, "\""}' a.txt ## 输出双引号 1 " 2 " 3 " 4 " 5 "

002、单引号
[root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt 1 2 3 4 5 [root@PC1 test]# awk '{print $0, "'\''"}' a.txt ## 输出单引号 1 ' 2 ' 3 ' 4 ' 5 '


浙公网安备 33010602011771号