#!/bin/bash
i=1
while ((i <= 254))
do
{
ping -c 1 192.168.190.$i > /dev/null
if [ $? == 0 ];then
echo 192.168.190.$i
fi
}&
let 'i+=1'
done
wait
# bash ping.sh | sort -t. -k4 -n
快速检测一个段内哪些主机能PING通
阅读 49
2023-06-04
#!/bin/bash
i=1
while ((i <= 254))
do
{
ping -c 1 192.168.190.$i > /dev/null
if [ $? == 0 ];then
echo 192.168.190.$i
fi
}&
let 'i+=1'
done
wait
# bash ping.sh | sort -t. -k4 -n
相关推荐
精彩评论(0)