标签:linux bash
#! /bin/bashwait()
{
echo -n "please waiting"
for ((i=0;i<3;i++));do
echo -n ".";sleep 1
done
}
check_website()
{ wait
for ((i=0;i<echo ${#url_list[*]}
;i++));do
wget -o /dev/null -T 3 --tries=1 --spider ${url_list[$i]} &> /dev/null
if [ $? -eq 0 ];then
action "${url_list[$i]}" /bin/true
else
action "${url_list[$i]}" /bin/false
fi
done
}
main()
{
check_website
}
main
标签:linux bash
原文地址:http://blog.51cto.com/546136/2091485