检查网址是否正常访问

code

#!/bin/bash
curl haiyou.tian-wang.com &> /dev/null
if [ $? -eq 0 ]; then
    curl_ins_search=1
else
    curl_ins_search=0
fi
echo $curl_ins_search

 

 

 

 

 

 

 

 

 

 

posted @ 2020-03-17 14:14  anobscureretreat  阅读(341)  评论(0编辑  收藏  举报