Created
January 17, 2019 06:30
-
-
Save jackyshan/5d8d48b268abdf747a26bb5bcc1ab9dd to your computer and use it in GitHub Desktop.
查找局域网ip列表
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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