标签:脚本
查询网段可用ip脚本
#!/bin/bash
rm -rf /log/ip.txt
for inum in `seq 1 253`
do
Un=`ping -c 2 10.0.1.$inum | grep loss | awk -F[:" "]+ ‘{print $6}‘`
if [ $Un = ‘100%‘ ];then
echo 10.0.1.$inum >> /log/ip.txt
fi
done
本文出自 “linux” 博客,请务必保留此出处http://yangzhiming.blog.51cto.com/4849999/1868664
标签:脚本
原文地址:http://yangzhiming.blog.51cto.com/4849999/1868664