[[email protected] sh]# a=99
[[email protected] sh]# echo "$a"
99
[[email protected] sh]# echo ‘$a‘
$a
[[email protected] sh]# echo $a
99
[[email protected] sh]# echo "99"
99
[[email protected] sh]# echo "\"99\""
"99"
[[email protected] sh]# echo "echo "sxt""
echo sxt
[[email protected] sh]# echo "`echo "sxt"`"
sxt
[[email protected] sh]# abc=$(echo $(ls "sxt"))
ls: cannot access sxt: No such file or directory
[[email protected] sh]# abc=$(echo $(ls /))
[[email protected] sh]# echo $abc
bin boot dev etc home jdk-7u67-linux-x64.rpm lib lib64 lost+found media mnt opt proc root sbin selinux share srv sys tmp usr var
[[email protected] sh]# aaa=$(echo $(echo ‘‘xxx))
[[email protected] sh]# echo aaa
aaa
[[email protected] sh]# echo $aaa
xxx
&&:有假为假
||:有真为真
原文地址:https://www.cnblogs.com/ryuuku/p/11623030.html