标签:$* RoCE color trie 1.5 $0 ide src cti
测试一下:
#!/bin/sh
function usage() { #<==甯姪鍑芥暟
echo $"usage:$0 url"
exit 1
}
function check_url() { #<==妫€娴婾RL鍑芥暟銆? wget --spider -q -o /dev/null --tries=1 -T 5 $1
#<==閲囩敤wget杩斿洖鍊兼柟娉曪紝杩欓噷鐨?1灏辨槸鍑芥暟浼犲弬銆? #curl -s -o /dev/null $1 #<==閲囩敤curl杩斿洖鍊兼柟娉曚篃鏄彲浠ョ殑銆? if [ $? -eq 0 ]
then
echo "$1 is ok."
exit 0
else
echo "$1 is fail."
exit 1
fi
}
function main() { #<==涓诲嚱鏁般€? if [ $# -ne 1 ] #<==濡傛灉浼犲叆鐨勫涓弬鏁帮紝鍒欐墦鍗板府鍔╁嚱鏁帮紝鎻愮ず鐢ㄦ埛銆? then
usage
fi
check_url $1 #<==鎺ユ敹鍑芥暟鐨勪紶鍙傦紝鍗虫妸缁撳熬鐨?*浼犲埌杩欓噷銆?}
main $* #<==杩欓噷鐨?*灏辨槸鎶婂懡浠よ鎺ユ敹鐨勬墍鏈夊弬鏁颁綔涓哄嚱鏁板弬鏁颁紶缁欏嚱鏁板唴閮紝甯哥敤鎵嬫硶
标签:$* RoCE color trie 1.5 $0 ide src cti
原文地址:http://blog.51cto.com/xiaorenwutest/2135499