Skip to content

Instantly share code, notes, and snippets.

@nmische
Created December 4, 2014 04:09
Show Gist options
  • Save nmische/7317403212356b174f8a to your computer and use it in GitHub Desktop.
Save nmische/7317403212356b174f8a to your computer and use it in GitHub Desktop.
nc test for failure
nc -v -z -w 3 google.com 80 &> /dev/null && echo "Online" || echo "Offline"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment