1

How to write an abort-on-error script without adding `|| exit $?` to every line?

view story
linux-howto

http://unix.stackexchange.com – I'm writing a bash script that should exit the error code of the last failed command and not continue execution. This can be achieved by adding a || exit $? everywhere, but is there an easier way, e.g. a set option at the start to do this without uglifying every line? (HowTos)