#!/bin/bashecho "ping一个地址三次 看是否能够平通"read -ep "请输入要ping的地址" dz ping -c 3 $dz &> /dev/null if [ $? -eq 0 ] then echo “host $dz 能ping通” else echo "host $dz ping 不通" fi