#!/bin/sh
#filename:Check-host_online.sh
#date:2015-12-23
#作者:linuxzkq
#Email:1729294227@qq.com
#version:v1.0
for n in `seq 254`
do
ping -c1 10.0.0.$n >/dev/null 2>&1
if [ $? -eq 0 ]
then
echo “10.0.0.$n is up” >>/data/uplist.log
else
echo “10.0.0.$n is down” >>/data/downlist.log
fi
done
原创文章,作者:3628473679,如若转载,请注明出处:https://blog.ytso.com/191028.html