level 2
while [ true ] ; do
$ECHO ""
$ECHO "PASSWORD"
$ECHO ""
stty -echo
printf "%s" ">>> Please enter your PPPoE password: "
read PWD1
$ECHO ""
printf "%s" ">>> Please re-enter your PPPoE password: "
read PWD2
$ECHO ""
stty echo
if [ "$PWD1" = "$PWD2" ] ; then
break
fi
printf "%s" ">>> Sorry, the passwords do not match. Try again? (y/n)"
read ANS
case "$ANS" in
N|No|NO|Non|n|no|non)
$ECHO "OK, quitting. Bye."
exit 1
esac
done
2010年11月24日 20点11分