From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <86c5f4f271e260e234a1a93f1f9001f3@hamnavoe.com> To: 9fans@cse.psu.edu From: Richard Miller <9fans@hamnavoe.com> Date: Mon, 28 Aug 2006 13:46:04 +0100 In-Reply-To: <44E692D6.8060108@lanl.gov> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] test command is broken Topicbox-Message-UUID: a8e77020-ead1-11e9-9d60-3106f5b1d025 The patch applied to the test(1) command on 12 August was incorrect, as shown by this example: term% test 1 -gt 2 -o 3 -lt 4 && echo yes yes term% test 1 -lt 2 -o 3 -lt 4 && echo yes test: unexpected operator/operand: 3 term% Because the -a and -o operators don't necessarily evaluate their right-hand argument, it's wrong to assume that there should be no arguments remaining when the top-level expresssion evaluation returns. The result is not just a spurious error message but possibly an incorrect truth status, so I would suggest that anyone who has pulled from sources since 12 August should revert to the previous version of /386/bin/test. -- Richard