Date: Fri, 13 Mar 2020 06:59:56 -0500 From: John McKown <john.archie.mck...@gmail.com> Message-ID: <caajsdjidsyg1yowc7ubbluudf3ug9ekdtkop7er-jojrlod...@mail.gmail.com>
| I do things like: | | test <some relational test> && { true_command1;true_command2; : ; } || { | false_command1; false_command2; false_command3; } That's OK, and at times I have been tempted that way, but it really is easier to just do if <some relational test> then true_command1 true_command2 else false_command1 false_command2 false_command3 fi Not only do you not need to remember that the ':' command (or "true") is important, but the exit status of all of this will be whichever of true_command2 or false_command3 that was executed, which can be used in other tests later. The cost of typing a few extra words to make things clearer, and having the code not look quite so "look what I can do ma" (ie: less "cool") is worth it to be more clear, and less likely to have bugs. kre