Checking exit codes in bash
No matter what command you run when using bash, an exit code is returned and the code can tell you if your command was successful or you ran into a problem. Exit codes and error messages are related, but you have to ask to see an exit code while errors are going to be displayed whether you want to see them or not.