Skip to content

Instantly share code, notes, and snippets.

@Pouya-moh
Created November 14, 2018 13:53
Show Gist options
  • Save Pouya-moh/062709fab65542033093eeec26e43bdd to your computer and use it in GitHub Desktop.
Save Pouya-moh/062709fab65542033093eeec26e43bdd to your computer and use it in GitHub Desktop.
ping all addresses in current subnet in loop instead of ping -b
$ time ( s=192.168.0 ; for i in $(seq 1 254) ; do ( ping -n -c 1 -w 1 $s.$i 1>/dev/null 2>&1 && printf "%-16s %s\n" $s.$i responded ) & done ; wait ; echo )
## credit: https://superuser.com/a/487014/195348
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment