Created
December 7, 2015 00:13
-
-
Save mikebell/0aa633b23d160293c0c1 to your computer and use it in GitHub Desktop.
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
trap 'error=1' ERR | |
while true; do | |
slackin "ACCOUNTNAMEHERE" "KEYGOESHERE" -p 8002 -s | |
code="$?" | |
if [[ -n "$error" ]]; then | |
echo "Caught an error! Status = $code" | |
error= # reset the error | |
elif [[ "$code" != 0 ]]; then | |
echo "Program exited with non-zero code: $code" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment