Discovery Subnet with Ping

Sometime we need to discover an entire subnet. This is a small script not so fast but easy: #!/bin/sh subnet=10.10.10. addr=1 while [ $addr -lt 256 ]; do ping -c 1 -t 1 $subnet$addr /dev/null && echo $subnet$addr Is Alive let addr=addr+1 done

8 February 2009 @ 03:58 · Updated: 30 June 2026 @ 03:28 · leo