[question] && chaining vs shell loops
- From
Max Kirillov <max@max630.net>
- Date
- Mar 29, 2015, 15:48 UTC
- Message-ID
- <20150329154840.GA8771@wheezy.local>
Hi.
As far as I can see, loops in shell ignore non-zero exit codes of the bodies which are not last. For example, exit code of command 'for f in false true; do $f; done' is 0, even if there was false.
How should one workaround it in test scripts, is there any established approach?
-- Max