Handling a Linux bash error

We've seen that one way to interact with the Linux kernel is through the shell, by invoking commands. A command can fail, as we can imagine, and a way to communicate a failure is to return a non-negative integer value. 0, in most cases, means success. This recipe will show you how to deal with error handling on the shell.