Last active
December 16, 2015 05:31
-
-
Save lyndell/907eaa7375316d324364 to your computer and use it in GitHub Desktop.
Ping multiple IPs
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
#/bin/bash -x | |
# | |
# Copyright (c) 2015 Lyndell Rottmann | |
# | |
# Debug mode on/off: (default off) | |
set +x | |
if [ -z "$@" ];then | |
echo "I can haz IPs?" | |
exit 1 | |
fi | |
for I in "$@" | |
do | |
ping -c4 $I | |
echo | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment