Consider something with nmap?
nmap -sP 10.1.2.0/24 10.2.5.0/24
It may be even simpler than a ping-loop, and it can scan multiple hosts in parallel so it'll appear much faster; but it will require the installation of nmap and its usual dependencies, and that may upset a resident security Oberleutnant fixated on the worst-case.
update: okay, Oberleutnanten for sure.
Instead:
xargs parallel -j20 ping -c1 -- | grep 'bytes from'
like
echo 10.0.{1..2}.{1..15} |\
xargs parallel -j20 ping -c1 -- | grep 'bytes from'
64 bytes from 10.0.2.15: icmp_seq=1 ttl=64 time=0.016 ms
64 bytes from 10.0.2.3: icmp_seq=1 ttl=64 time=0.150 ms
64 bytes from 10.0.2.4: icmp_seq=1 ttl=64 time=0.176 ms
64 bytes from 10.0.2.2: icmp_seq=1 ttl=64 time=0.138 ms
the time's good, too, as most of it is waiting for the pings to die at once. The positive results come back super fast:
$ time (echo 10.0.{1..2}.{1..15} | xargs parallel -j30 ping -c1 -- | grep 'bytes from')
64 bytes from 10.0.2.15: icmp_seq=1 ttl=64 time=0.016 ms
64 bytes from 10.0.2.3: icmp_seq=1 ttl=64 time=0.150 ms
64 bytes from 10.0.2.4: icmp_seq=1 ttl=64 time=0.176 ms
64 bytes from 10.0.2.2: icmp_seq=1 ttl=64 time=0.138 ms
real 0m10.030s
user 0m0.019s
sys 0m0.018s
Swap out an arping and its particular parms for the ping if you wanna sniff winboxes too, as they hate pings.
Change out the cheesy grep for an awk '/bytes from/{print $4}' if you wanna get keen.
No bones about it, these other guys' ideas look like great quiz submissions and mine looks like banging nails with a screwdriver, but it's fast and simple.
nmap
not acceptable? It implements the ping scan it seems like you're trying to achieve