双引号与单引号区别
1.单引号会把之中的所有内容当成普通字符,包括特殊字符:
FILE_NAME="marcus.txt"
echo 'the file name is: ${FILE_NAME}'
输出:the file name is: ${FILE_NAME}
2.双引号则会将变量转为所代表的值:
FILE_NAME="marcus.txt"
echo "the file name is: ${FILE_NAME}"
输出:the file name is: marcus.txt
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/7417681/viewspace-709895/
,如需转载,请注明出处,否则将追究法律责任。