#!/bin/bash
for a in 192.168..{..};do
ping -c -i 0.5 $a >/dev/null && echo "$a 在线" || echo "$a 离线" #将回显重定向到/dev/null
done
2023-10-10 08:45:34
#!/bin/bash
for a in 192.168..{..};do
ping -c -i 0.5 $a >/dev/null && echo "$a 在线" || echo "$a 离线" #将回显重定向到/dev/null
done