Unverified50% confidenceFactExact time
An exit status code is the integer returned to the caller after each command finishes in the shell; 0 indicates success, non-zero indicates failure, and it can be read via $?.
1
Sources
50%
Confidence
Long-term
Relevance
10/19/2026
First Seen
Sources
Related Entities
Related Claims
UnverifiedAn exit code is an integer returned to the parent process when a Unix process ends, with the convention that 0 means success and non-zero means failure; CI systems decide whether the pipeline passes based on the exit code rather than log text.76% similarUnverifiedThe script should serve as a gate rather than a grade, exiting with a non-zero status code so that failures surface in the terminal.66% similarUnverifiedThe shell redirection operator `>` creates or truncates the target file before the command runs, so when the command fails the output file may still exist but contain empty content or an error message.64% similarUnverifiedThe script chooses exit code 2 rather than 1 as the failure code because, by shell convention, 2 is commonly used for "usage error or condition not met," making it easy to distinguish a script crash from an active ledger rejection.62% similarUnverifiedA common way to capture a subcommand's error output in a shell script is: use err=$(restic backup ... 2>&1 >/dev/null) to collect stderr into a variable and then check $?; or use set -o pipefail together with tee to both write to disk and forward the output.62% similar
Cite This Claim
Stable URI
https://kongchang.com/claim/1066842API
curl https://kongchang.com/api/v1/knowledge/claims/1066842MCP
get_claim(id=1066842)