shell ping ip或者域名是否存在
ip=gc-server if ping -c 1 $ip > /dev/null; then echo "$ip Ping is successful." else echo "$ip Ping is failure" fi