Skip to content

Instantly share code, notes, and snippets.

@qoobaa
Last active August 2, 2018 06:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qoobaa/4ce232e7ab40b1e8515b83a840fbc213 to your computer and use it in GitHub Desktop.
Save qoobaa/4ce232e7ab40b1e8515b83a840fbc213 to your computer and use it in GitHub Desktop.
if ping -q -c 5 -W 1 192.168.1.1 > /dev/null; then
echo "IPv4 is up"
else
echo "IPv4 is down"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment