标签:
今天是WEBSOCKET,,
先完成一个SHELL的GETOPS,周一就用得着。
#!/bin/bash echo "usage: ./$0 -t (prism|opscripts)" function scp_prism() { echo "scp_prism()" } function scp_opscripts() { echo "scp_opscripts()" } while getopts t:h OPT do case $OPT in "t") TYPE=$OPTARG if [ $TYPE = "prism" ];then scp_prism fi if [ $TYPE = "opscripts" ];then scp_opscripts fi ;; "h") echo "./$0 -t (prism|opscripts)" ;; \?) echo "$0 -t (prism|opscripts)" exit -1 esac done
标签:
原文地址:http://www.cnblogs.com/aguncn/p/5059087.html