if语句的一般结构
if 条件表达式
then
条件序列
fi
if...else语句
if 条件表示式
then
条件序列1
else
条件序列2
fi
if..elif语句
if 条件表示式1
then
条件序列1
elif 条件序列2
then
命令序列2
else
条件序列3
fi
例:
if语句的一般结构
if 条件表达式
then
条件序列
fi
if...else语句
if 条件表示式
then
条件序列1
else
条件序列2
fi
if..elif语句
if 条件表示式1
then
条件序列1
elif 条件序列2
then
命令序列2
else
条件序列3
fi
例: