1、 if 条件判断 then 执行命令 fi 2、if 条件判断;then 执行命令 elif 条件判断2;then 执行条件 else 执行条件 fi 例:以交互模式在shell脚本中写从x加到y的和