linux 中 echo命令如何输出感叹号

发布时间 2023-06-22 09:47:27作者: 小鲨鱼2018

 

001、方法1

[root@PC1 test01]# echo 'abc!'     ## 使用单引号
abc!

 

002、方法2

[root@PC1 test01]# echo "abc! "     ## 双引号, 感叹后后面加空格
abc!

 

003、方法3

[root@PC1 test01]# echo abc!         ## 什么引号都不加
abc!

 

参考:https://www.cnblogs.com/chuanzhang053/p/9253410.html