首先说明参数
代码
创建curl.sh文件
if [ $# != 1 ]; then
echo "The parameters you enter is not correct !";
exit -1;
fi
#循环读出URL并判断状态码
while read line
do
{
echo %{http_code} $line
isok=`curl -I -o /dev/null -s -w %{http_code} $line`
创建curl.sh文件
if [ $# != 1 ]; then
echo "The parameters you enter is not correct !";
exit -1;
fi
#循环读出URL并判断状态码
while read line
do
{
echo %{http_code} $line
isok=`curl -I -o /dev/null -s -w %{http_code} $line`