On 25/02/18 19:27, Bastian Blank wrote: > On Sat, Feb 24, 2018 at 07:18:32PM -0500, Wietse Venema wrote: >> We could add this at the top of the script: >> m4 </dev/null || exit 1 > > Using "set -e" is much more effective and finds all errors.
Please no. set -e is an attempt to cover all error cases without bailing on commands that return non-zero but aren't errors, therefore it has all sorts of crazy rules about what is and isn't an error and much of the time will not do what you think it does. The safe way is to use || exit 1 as Wietse said above. See: http://mywiki.wooledge.org/BashFAQ/105 Peter