From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 7 Feb 1996 07:21:15 -0500 From: miller@hamnavoe.demon.co.uk miller@hamnavoe.demon.co.uk Subject: mistakes in test(1) Topicbox-Message-UUID: 3b189794-eac8-11e9-9e20-41e7f4b1d025 Message-ID: <19960207122115.2qvSrLDGX-hKA-aD3tnxa_DwDuMBqtK-c2z8wZtKlBs@z> I think there are two errors in the implementation of the test command, as shown by the following examples: if (test -d . -a ! -f .) echo OK if (test ! ! -d .) echo OK A suggested correction: diff /sys/src/cmd/test.c test.c 86c86 < return(!e3()); --- > return(!e2()); 193c193 < return(dir.mode&CHDIR); --- > return((dir.mode&CHDIR)!=0); -- Richard Miller 18 Lathbury Road, Oxford OX2 7AU, England