Last active
March 16, 2018 09:25
-
-
Save sun4lower/ceafc83f6b42ec013f72af4d54bcafbe to your computer and use it in GitHub Desktop.
Expands to the exit status of the most recently executed foreground pipeline.
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
echo $? | |
if [$? -eq 0]; then | |
# do something | |
else | |
# do something else | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment