#!/bin/bash
function check_url(){
curl -I -s $1 |head -1&& return 0 ||return 1
}
check_url $1
# sh check_url.sh192.168.217.129
HTTP/1.1 200 OK
转载于:https://blog.51cto.com/wangjiatong/1873198
#!/bin/bash
function check_url(){
curl -I -s $1 |head -1&& return 0 ||return 1
}
check_url $1
# sh check_url.sh192.168.217.129
HTTP/1.1 200 OK
转载于:https://blog.51cto.com/wangjiatong/1873198