雙引號“”:不進行轉義,保留變量屬性。
單引號‘’:進行轉義,使其成為單純的字符串。
[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