Created
July 2, 2019 15:14
-
-
Save pearlboy/10cf83936d63075abb1b578ca5f34e00 to your computer and use it in GitHub Desktop.
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
gw=$(ip route get 8.8.8.8 | grep via | awk '{print $3}') && ping -W 2 -c 1 $gw > /dev/null 2>&1 && echo $? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment