> Nonetheless, we should be checking the error code after every line
> executes, one way or another. Is there a way to automatically do this
> in bash?
"set -e" should do it.
Google brings up this page, besides lots of others:
http://www.davidpashley.com/articles/writing-robust-shell-scripts.html
Cheers,
Burcin