检测局域网中还可用的ip地址

 

 

#!/bin/bash

for i in `seq 1 254`
do
{
ping -c2 192.168.1.$i &>/dev/null
if [ $? != 0 ];then
echo "192.168.1.$i is not used"
fi
}
done

 

posted @ 2015-10-30 11:08  泽锦  阅读(551)  评论(0编辑  收藏  举报