Last active
August 2, 2023 13:36
-
-
Save Ran-Xing/5815e43128e3fa6a95590046f3ef5f7f to your computer and use it in GitHub Desktop.
testNetWork.sh
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
if curl -s -m 5 -o /dev/null -w "%{http_code}" www.google.com | grep -q "200"; then | |
echo "true" | |
else | |
echo "false" | |
fi |
Author
Ran-Xing
commented
Jul 19, 2023
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment