Skip to content

Instantly share code, notes, and snippets.

@thesp0nge
Created July 27, 2017 12:32
Show Gist options
  • Select an option

  • Save thesp0nge/c5350fd5af5834762f10b2223b47624f to your computer and use it in GitHub Desktop.

Select an option

Save thesp0nge/c5350fd5af5834762f10b2223b47624f to your computer and use it in GitHub Desktop.
#!/bin/sh
PING=`which ping`
SUBNET="192.168.10."
for i in `seq 254`; do $PING -c 1 -W 1 $SUBNET$i | grep 'from' | cut -d' ' -f 4 | tr -d ':'; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment