Last active
June 4, 2022 00:42
-
-
Save akskap/fcd7817ee34835de90c3aaf5088162b0 to your computer and use it in GitHub Desktop.
Custom Exit Codes in Bash
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
#!/usr/bin/env bash | |
SUCCESS=0 | |
FILE_NOT_FOUND=240 | |
DOWNLOAD_FAILED=241 | |
function read_file() { | |
if ${file_not_found}; then | |
return ${FILE_NOT_FOUND} | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment