1 #/usr/bin/sh
2 #grad /etc/hosts and ping each address
3 cat /etc/hosts|grep -v '^#' | while read LINE
4 do
5 ADDR=`awk '{print $1}'`
6 for MACHINE in $ADDR
7 do
8 ping $MACHINE -n 2
9 done
10 done
2016-11-16
将/etc/hosts下所有的地址都ping 2次
评论
发表评论
姓 名: