function inpasswd {
read -s -p "Enter You Password:" passwd1
echo
read -s -p "Please Check Password" passwd2
echo
if [[ $passwd1 == $passwd2 ]]
then
echo "correct" && exit 1
else
echo "incorrect"
echo "Please Input Agin"
fi
}
count=1
while true
do
if [ $count -gt 3 ]
then
break
fi
inpasswd
((count++))
done
echo "Input 3 Times and exit ByeBye"
先放这。晚上再修改
时间: 2024-11-06 21:43:58