tags:

views:

32

answers:

1

How can I have bash stop on the first command failure, without putting stuff like this all through my code?

some_prog || exit 1
some_other_prog || exit 1
+6  A: 

Maybe you want set -e:

http://www.davidpashley.com/articles/writing-robust-shell-scripts.html#id2382181

Alok