Created
December 3, 2016 00:58
-
-
Save euank/17ec654bb4ecb76cb5b51c79ae30be6f to your computer and use it in GitHub Desktop.
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
| $ cat file.sh | |
| #!/bin/bash | |
| set -e | |
| function command_not_found_handle { | |
| echo "Command not found: $1" | |
| exit 1 | |
| } | |
| if [[ "dne" == "dne" ]] && "dne" == "dne" ]]; then | |
| echo yes | |
| else | |
| echo no | |
| fi | |
| echo "did not exit" | |
| $ ./file.sh | |
| Command not found: dne | |
| no | |
| did not exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment