Created
April 19, 2017 23:35
-
-
Save tamarabartlett/282cd117da283442665d7b94e8cd7e92 to your computer and use it in GitHub Desktop.
Ping an IP
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
ping -c 1 $1 > /dev/null 2>&1 | |
RETVAL=$? | |
if [ $RETVAL -eq 0 ]; | |
then | |
echo "Test Passed" | |
else | |
echo "Test Failed" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment