#!/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
标签:sort,哪些,主机,PING,190,192.168,echo,done,bash
From: https://blog.51cto.com/xiaofeiji/6410808