Question 13 of 20Pro Only
Explain exit codes in Bash. What do they mean and how do you use them for error handling in scripts?
Sample answer preview
Exit codes are numeric values that commands return to indicate success or failure. They are fundamental to error handling in shell scripts. The convention is simple: zero means success, any non-zero value means failure. The special variable $?
exit code$?set -eset -o pipefailerror handlingzero success