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.
The
pingpong.sh
script pings all hosts on a subnet to get them into the ARP cache so thatarp -a
can be run to find hosts with a match to the range of RPi MAC addresses. Rather thanping
followed byarp
, use of the utilityarping
should be evaluated as a potential upgrade or enhancement. Alsosed
may offer some additional utility in extracting IP addresses.