Created
December 23, 2015 09:34
-
-
Save planetexpress69/5ecb16e968d44cbecac0 to your computer and use it in GitHub Desktop.
subnet ping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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