Created
March 8, 2021 10:56
-
-
Save iamdylanngo/c2a9b5015b08ff3ac33f61013513b5fb to your computer and use it in GitHub Desktop.
exit-bash-code
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
# For example: | |
## my-bash.sh | |
```bash | |
echo "Hello world" | |
exit 0 | |
``` | |
## Run command | |
bash my-bash.sh && echo "Good bye" | |
Result: | |
```bash | |
Hello world | |
Good bye | |
``` | |
## Run command again | |
bash my-bash.sh || echo "Good bye" | |
Result: | |
```bash | |
Hello world | |
``` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment