#!/bin/bash
while :
do
echo -n "Enter any number [1...5]:"
read ANS
case $ANS in
1|2|3|4|5)
echo "you enter a number between 1 and 5"
;;
*)
echo -n "Wrong number ,continue (y/n?):"
read IS_CONTINUE
case $IS_CONTINUE in
y|yes|Y|Yes)
continue
;;
*)
break
;;
esac
esac
done
shell ---while
最新推荐文章于 2014-11-06 12:25:43 发布