On Tue, May 2, 2017 at 7:13 AM, Greg Wooledge <wool...@eeg.ccf.org> wrote: [...] > would be safe. Your test command has 6 arguments, for which "the results > are unspecified". > http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html
Hm. That section of the standard refers to "The algorithm for determining the precedence of the operators and the return value that shall be generated is based on the number of arguments presented to test.". I don't understand why the standard would introduce the -a / -o primitives, only to make their use unspecified a few paragraphs later. At this point I guess I'd also go with your suggestion. After re-reading the test specification, I couldn't determine what the precedence of the not operator is in relationship to the and/or operators.