标签:else pid name 检测 url检测 check url main trie
#!/bin/bash
# filename : 8_5_1.sh
function usage(){
echo "usage:$0 url"
exit 1
}
function check_url(){
wget --spider -q -o /dev/null --tries=1 -T 5 $1
if [ $? -eq 0 ];then
echo "$1 is yes"
else
echo "$1 is no"
fi
}
function main(){
if [ $# -ne 1 ];then
usage
fi
check_url $1
}
main $*
标签:else pid name 检测 url检测 check url main trie
原文地址:http://www.cnblogs.com/shengy/p/7458220.html