Last active
November 8, 2018 21:22
-
-
Save pwenzel/42a0d00e4857ee9aa0c06740b365ae59 to your computer and use it in GitHub Desktop.
Ping host and do something if it's down. Example showing how to use and/or operator in Fish shell
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
ping -q -c 1 bogus.local; and echo "pinging the host worked"; or echo "pinging the host didn't work" | |
ping -q -c 1 google.com; and echo "pinging the host worked"; or echo "pinging the host didn't work" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment