Chris Torek <chris.torek@xxxxxxxxx> writes: > On Mon, Jul 8, 2024 at 3:35 AM Georg Pfuetzenreuter <georg@xxxxxxxxxx> wrote: >> https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html states >> >> "The XSI extensions specifying the -a and -o binary primaries and the >> '(' and ')' operators have been marked obsolescent." >> >> suggesting "&&" being preferred over "-a". > > That's annoying, I wonder why they did that. Consult Documentation/CodingGuidelines? - We do not write our "test" command with "-a" and "-o" and use "&&" or "||" to concatenate multiple "test" commands instead, because the use of "-a/-o" is often error-prone. E.g. test -n "$x" -a "$a" = "$b" is buggy and breaks when $x is "=", but test -n "$x" && test "$a" = "$b" does not have such a problem.