shell脚本中多个条件判断的语法

if [ "$content" = "hello" ]
   || [ "$content" = "kitty" ]
then
    echo "content is hello or kitty"
elif  [ "$content" = "red" ]
    || [ "$content" = "yellow" ]
then
    echo "content is red or yellow"
fi  

特别注意:"]"和""之间无空格

原文地址:https://www.cnblogs.com/dakewei/p/9884402.html