-
Recent Posts
Recent Comments
- zestnzen on Great advice
- Cecile Braun-Jones on Efficiency
Archives
Categories
Meta
Monthly Archives: June 2015
Exception Handling in Bash
Here’s a convenient pattern for anyone doing Bash scripting: Use a subshell with the Bash halt-on-failure feature enabled to execute a set of commands but break as soon as any one of them fails.
1 2 3 4 5 6 7 8 |
( set -e # Enable halt-on-failure true echo foo false echo bar echo baz ) |
The above example will print … Continue reading
Posted in Uncategorized
Comments Off on Exception Handling in Bash