Skip to content

Instantly share code, notes, and snippets.

@jackyshan
Created January 17, 2019 06:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jackyshan/5d8d48b268abdf747a26bb5bcc1ab9dd to your computer and use it in GitHub Desktop.
Save jackyshan/5d8d48b268abdf747a26bb5bcc1ab9dd to your computer and use it in GitHub Desktop.
查找局域网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