Last active
December 6, 2015 06:19
-
-
Save btcrooks/062ecb9f761277abbc71 to your computer and use it in GitHub Desktop.
Capture and return the exit status
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
#!/usr/bin/env bash | |
# | |
# @description: Capture and return the exit status | |
# | |
function exitStatus() { | |
"${1}" "${2}" >/dev/null ; echo $?; | |
} | |
## Test all the things!! | |
foo=$(exitStatus "type" "mongo") | |
echo ${foo} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment