Skip to content

Instantly share code, notes, and snippets.

@jackyshan jackyshan/ping.sh
Created Jan 17, 2019

Embed
What would you like to do?
查找局域网ip列表
#!/bin/bash
loop=1
host="172.31.42."
while(( $loop<=254 ))
do
ip="$host$loop"
# echo $ip
let "loop++"
ping $ip -t 1
done
arp -a | grep -v "incomplete"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.