seamusdemora / PiFormulae

A collection of "How-To" guides or "Recipes" for the Raspberry Pi
64 stars 9 forks source link

Improved sh script to find Raspberry Pi's on a LAN #1

Open seamusdemora opened 6 years ago

seamusdemora commented 6 years ago

The pingpong.sh script pings all hosts on a subnet to get them into the ARP cache so that arp -a can be run to find hosts with a match to the range of RPi MAC addresses. Rather than ping followed by arp, use of the utility arping should be evaluated as a potential upgrade or enhancement. Also sed may offer some additional utility in extracting IP addresses.