标签:code word echo exit inpu col 错误 div shel
function checkPwd() { pwdCount=1 read -s -p "Please input the password: " thePwd clear while true; do if [ "${pwdCount}" -ge 3 ]; then echo "bye" exit 1 fi if [ "$thePwd" = "123456" ]; then break else echo "Error: The password is error." echo read -s -p "Please input the password: " thePwd clear fi pwdCount=`expr ${pwdCount} + 1` done }
标签:code word echo exit inpu col 错误 div shel
原文地址:https://www.cnblogs.com/gered/p/12168146.html