https://stackoverflow.com/questions/4072984/how-do-i-get-the...
https://serverfault.com/questions/143445/what-does-set-e-do-...
pipefail is worse because tools like grep return non-zero for things that aren't inherently errors. Error handling in sh-like shells is archaic enough that if you're reaching for it you should strongly consider reaching for a different language.