[[email protected] ~]# vim wlan.sh #!/bin/bash # ping check scripts for IP in 192.168.9.{1..254} do ping -c 2 -i 0.1 -W 1 $IP &> /dev/null if [ $? -eq 0 ] then echo "Host $IP is up." else echo "Host $IP is down." fi done 探测局域网内存活主机:192.168.9.0网段
时间: 2024-11-05 20:44:10