28 Sep 2019
if [ condition1 ] && [ condition2 ] || [ condition3 ] then #statements elif [ condition ] then #statements else #statements fi
if ([ condition1 ] && [ condition2 ]) || ([ condition3 ] || [ condition4 ]) then #statements elif [ condition ] then #statements else #statements fi
# 如果没有elif和else,可以用下面的语句简化if语句 [[ condition1 ]] && statements # 如果是多个判断条件和多个后续语句 ([[ condition1 ]] && [[ condition2 ]]) || ([[ condition3 ]] || [[ condition4 ]]) && ( statement1; statement2; statement3)