On 5/2/17 9:07 AM, Eduardo Bustamante wrote: > 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.
They're marked obsolescent. The reason for including them is to permit existing behavior, so that as many implementations as possible are conformant. They're marked as unspecified because that existing behavior differs. The standard is as explicit as standards get about advising people to not use them. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/