双引号“”:不进行转义,保留变量属性。
单引号‘’:进行转义,使其成为单纯的字符串。
[root@localhost test]# A=10 [root@localhost test]# echo $A 10 [root@localhost test]# echo "number is $A" ## 双引号不进行转义, 保留变量属性 number is 10 [root@localhost test]# echo 'number is $A' ## 单引号进行转移,转义为单纯字符串 number is $A