sh: missing ]
if 条件语句
“或”多个条件并行时 执行then命令
变量a等于aa且变量b等于bb 或者 变量c等于cc且变量d等于dd 这样的条件成立的话,输出success
if [ $a = "aa" -a $b = "bb" ] || [$c = "cc" -a $d = "dd" ];
then
echo "success"
fi
sh: missing ]
if 条件语句
“或”多个条件并行时 执行then命令
变量a等于aa且变量b等于bb 或者 变量c等于cc且变量d等于dd 这样的条件成立的话,输出success
if [ $a = "aa" -a $b = "bb" ] || [$c = "cc" -a $d = "dd" ];
then
echo "success"
fi
转载于:https://www.cnblogs.com/chenxiaomeng/p/10864553.html