Error handling in bash

Despite the prevalence of wonderful new languages like python julia and fortran shell scripts are still prevalent and useful. Particularly for tasks that require interaction with a linux system and filesystem in particular.

bash is a popular and common language. In order to write robust, well behaved scripts that gracefully and correctly handle error conditions it is necessary to understand how to handle errors correctly.

I came across this very nice and accessible summary covering many aspects of error handling in bash that I highly recommend:

5 Likes