3 ms·
I think your script chugging along in the face of a failure and running whatever commands that probably relied on what happened before it blindly is probably mo
by vore 4y ago
I think your script chugging along in the face of a failure and running whatever commands that probably relied on what happened before it blindly is probably more evil, though.
- inferiorhuman 4y agoset -e creates two problems. The first is that what is considered "failure" by the shell is not consistent or intuitive. The second is that what each of your tools consider failure is also not necessarily intuitive. You're getting a false sense of security at best. E.g. grep considers no matches worthy of a non-zero (a.k.a. error) exit code while df considers an invalid block size an error worthy of a exit code of zero. Ostensibly printf(1) exits with non-zero on an error, but a format specifier with insufficient arguments is not an error.
- pmarreck 4y agoSo basically, Go? ;)