Created
June 13, 2014 18:31
-
-
Save ssimpson89/8bd99cab05534c4e93ea to your computer and use it in GitHub Desktop.
Ping Script
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
for i in $@ | |
do | |
ping -q -c 1 -W 1 ${1} >/dev/null | |
if [[ $? == 0 ]] | |
then | |
echo $1 OK | |
else | |
echo $1 FAILED | |
fi | |
shift | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment