#!/bin/sha bit faster
jot 254 1 |
xargs -n1 -P256 sh -c '
ping -c 1 192.168.1.$1 >/dev/null 2>/dev/null &&
echo $1
' sh
Runs faster if you ping in parallel:
https://codeberg.org/rldane/scripts/src/branch/main/ipscan
Requires bash, but could be easily converted to ksh/oksh/mksh/pdksh