#!/bin/bashPATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/binexport PATHip=\"192.168.11.\"for i in `seq 100 110`doping -w 1 -c 1 \"$ip$i\" &>/dev/nullif [[ $? == 0 ]]thenecho \"$ip$i is up\" >>/tmp/1.txtelseecho \"$ip$i is down\" >>/tmp/1.txtfidone
shell ping
未经允许不得转载:爱站程序员基地 » shell ping