From: miller@hamnavoe.demon.co.uk miller@hamnavoe.demon.co.uk
Subject: mistakes in test(1)
Date: Wed, 7 Feb 1996 07:21:15 -0500 [thread overview]
Message-ID: <19960207122115.2qvSrLDGX-hKA-aD3tnxa_DwDuMBqtK-c2z8wZtKlBs@z> (raw)
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 <miller@hamnavoe.demon.co.uk>
18 Lathbury Road, Oxford OX2 7AU, England
next reply other threads:[~1996-02-07 12:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-02-07 12:21 miller [this message]
-- strict thread matches above, loose matches on Subject: below --
1996-02-07 17:26 dhog
1996-02-07 9:21 Dave
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19960207122115.2qvSrLDGX-hKA-aD3tnxa_DwDuMBqtK-c2z8wZtKlBs@z \
--to=miller@hamnavoe.demon.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).