标签:div network please src amp seq for com else
1、脚本内容:
#vi hhh
添加以下内容:
#!/bin/bash read -p "Please keyin the network segment: (e.g. 10.88.1) " farm for i in `seq 2 255` do ip="$farm.$i" ping -c 3 $ip &> /dev/null if [ $? -eq 0 ];then echo -e "$ip is \e[32mUp\e[0m" else echo -e "$ip is \e[31mDown\e[0m" fi done
2、脚本使用:
标签:div network please src amp seq for com else
原文地址:http://www.cnblogs.com/pzzning/p/6251732.html