#!/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
微信扫一扫
#!/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
相关推荐