标签:shell reply ++ 练习 his nbsp dock work cas
#!/bin/bash echo "please choose your profession?" PS3="please choose the number : " function a(){ echo "this is funciton a" } function b(){ echo "this is function b" } n=0 select var in "worker" "dock" "teacher" do case $var in worker) a ;; dock) b ;; *) esac echo "the choose num is \$REPLY is $REPLY" echo "your preofession is $var" let n++ if [ $n -gt 2 ] then break fi done标签:shell reply ++ 练习 his nbsp dock work cas
原文地址:http://blog.51cto.com/19941018/2067334