ping.sh

#! /bin/bash
for siteip in $(seq 72 190)
do
site="10.250.96.${siteip}"
ping -c1 -W1 ${site} &> /dev/null
if [ "$?" == "0" ]; then
echo "$site is UP"
else
echo "$site is DOWN"
fi
done

 

posted @ 2017-12-04 09:38  *奥特*  阅读(140)  评论(0编辑  收藏  举报