Created
May 7, 2017 16:22
-
-
Save thegitfather/b50cccd8c56d1df0cedfc51b6baec059 to your computer and use it in GitHub Desktop.
assign exit code of a sub shell command to a variable
This file contains hidden or 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
ALIVE=$(ping -c 3 www.example.com &>/dev/null ; echo $?) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment