until [ "${word}" == "yes" ] || [ "${word}" == "YES" ] do read -p "Please input yes/YES to stop this program: " word done 这个小程序中,方括号的左右都是要加空格的,否则会报错说无法识’[‘对应的’]’ 糟心。
until [ "${word}" == "yes" ] || [ "${word}" == "YES" ] do read -p "Please input yes/YES to stop this program: " word done