I have a bash script like this
#!/bin/bash do-this parm someotherparam do-something-else $varz $(commands) and-also-do-this -something finally-do-something-different -yes
I want this script to return exit status of 0, if all the individual commands above returned 0. I want it to return non-zero if any of the individual commands returned non-zero. I do not care what non-zero value is as long as it is, well, not 0.
Obviously, if we check status after each line, we can achieve our objective easily if only verbose. Since I'm new to bash, I was wondering if there is an idiomatic way of writing this.
Note: I want all the commands to run regardless of their exit status, otherwise something like this would work