Shell_2(验证符合的输入)

 1 #!/bin/bash
 2 
 3 echo "Enter password:"
 4 read password
 5 
 6 while [ "$password" != "123" ];
 7         do
 8                 echo "Sorry, try again."
 9                 read password
10 done
11 exit 0
View Code

 

posted @ 2013-12-07 14:46  茶陵后  阅读(75)  评论(0编辑  收藏  举报