Skip to content

Instantly share code, notes, and snippets.

@tamarabartlett
Created April 19, 2017 23:35
Ping an IP
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