until__shell脚本
工作环境:Red Hat Enterprise Linux Server release 6.5 (Santiago) 、bash
#!/bin/bash
#
until [[ $choice == "end" ]]
do
read -p "input name:" name
until ! [ -z $name ]
do
echo ""
read -p "input name error ,once again:" name
done
until [ "$name" != "zlj" ]
do
read -p "input name is exit,once again:" name
until ! [ -z $name ]
do
echo ""
read -p "input name error ,once again:" name
done
done
read -s -p "input password:" pass
until [ ${#pass} -gt 3 ]
do
echo
read -s -p "input password too short ,must bigger than 3:" pass
done
echo
echo "success"
read -p "if you want to exit,please input "end":" choice
done
exit
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。