Skip to content

Instantly share code, notes, and snippets.

@planetexpress69
Created December 23, 2015 09:34
Show Gist options
  • Save planetexpress69/5ecb16e968d44cbecac0 to your computer and use it in GitHub Desktop.
Save planetexpress69/5ecb16e968d44cbecac0 to your computer and use it in GitHub Desktop.
subnet ping
CURR=1
SUBNET="10.0.0"
while [ $CURR -lt 255 ] ; do
ping -c1 -t1 $SUBNET.$CURR 2>&1 >/dev/null
if [ "$?" -eq "0" ]; then
echo "$SUBNET.$CURR"
fi
let CURR=$CURR+1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment