I'd like to execute find an equivalent ofcmd 1 && cmd 2 && ... && cmd 20But with commands expressed with a for loop:for i in {1..20}do   cmd $idoneWhat would you suggest to change in the second expression to find an equivalent of the first (put commands in conjunction)?
How do I replace and (&&) in a for loop?
bash;shell script;shell;scripting;for
The equivalent to your original sequence would be:for i in {1..20}do   cmd $i || breakdoneThe difference with Amit's answer is the script won't exit, i.e. will execute potential commands that might follow the sequence/loop. Note that the return status of the whole loop will always be true with my suggestion, this might be fixed if relevant in your case.