#字元串比較if [ "$1" == "判斷條件" ] then echo "$1" elif [ "$1" == "判斷條件" ] then echo "$1" else echo '[提示信息]' fi#數值比較int1 -eq int2 兩數相等為真int1 -ne int2 兩數不等為真in ...
#字元串比較
if [ "$1" == "判斷條件" ] then echo "$1" elif [ "$1" == "判斷條件" ] then echo "$1" else echo '[提示信息]' fi
#數值比較
int1 -eq int2 兩數相等為真
int1 -ne int2 兩數不等為真
int1 -gt int2 int1大於int2為真
int1 -ge int2 int1大於等於int2為真
int1 -lt int2 int1小於int2為真
int1 -le int2 int1小於等於int2為真