标签:while循环 div desktop shell log top roo ash rom
#! /bin/bash echo "guest the num from 1 to 10" read num while [ $num != 5 ] do if [ $num -lt 5 ] then echo "Too small,try agin" read num elif [ $num -gt 5 ] then echo "Too large,try agin" read num fi echo "bingo" done
[root@lenny Desktop]# ./guest.sh guest the num from 1 to 10 4 Too small,try agin 5 bingo
标签:while循环 div desktop shell log top roo ash rom
原文地址:http://www.cnblogs.com/leonarcohen/p/6166307.html