Bash Shell Exit Status

Exit status codes are helpful when creating shell scripts with IF statements. They are also helpful when you are trying to troubleshoot the outcome of a command. You can use "echo $?" to find out the exit status. In the terminal exit codes are not displayed on the screen by default,