#!/bin/bash
whiletrue;do
forIin{100..120};do
ping-c2-w2192.168.0.$I&>/dev/null
if[$?-eq0];then
echo-e"\033[32;40m192.168.0.$IisUP.\033[0m"
else
echo-e"\033[32;40m192.168.0.$IisDOWN.\033[0m"
fi
done
break
done
执行结果
[root@localhost~]#shping.sh
19..
分类:
系统相关 时间:
2017-06-29 17:53:55
阅读次数:
214