Skip to content

Instantly share code, notes, and snippets.

@tamarabartlett
Created April 19, 2017 23:35
Show Gist options
  • Save tamarabartlett/282cd117da283442665d7b94e8cd7e92 to your computer and use it in GitHub Desktop.
Save tamarabartlett/282cd117da283442665d7b94e8cd7e92 to your computer and use it in GitHub Desktop.
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