首页 > 代码库 > shell循环判断输入值

shell循环判断输入值

until [[ $flag == "yes" || $flag == "exit" ]]doread -p "请确认统一/合服前后数据是否一致,输入yes继续执行脚本,输入exit退出:" flagif [[ $flag = "yes" ]]; then    breakelif [[ $flag = "exit" ]];then    exitelse    continuefidone

做个记录

shell循环判断输入值