[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: or operator bug in find
From: |
Marcel Martin |
Subject: |
Re: or operator bug in find |
Date: |
Sun, 19 Jan 2003 13:36:19 +0100 |
User-agent: |
KMail/1.5 |
(Sorry for the late reply)
On Wednesday 08 January 2003 01:45, Neil J. O'Neill wrote:
> The following commands, which I assume should return every file in the
> directory tree, are not returning any hits.
>
> find . -true -o -true -print
> find . -true -o -false -print
The -true and -print directives are connected by an implicit "-and" and since
-and takes higher precedence than -or, the expressions you mentioned will be
evaluated as
find . -true -o ( -true -a -print )
and
find . -true -o ( -false -a -print )
respectively.
Since the second expression is not evaluated if the first one is true (see
section "Operators" in the man page), nothing gets printed.
Regards,
Marcel
--
. .
/ V / Marcel Martin Bielefeld OpenPGP public key:
\ \ address@hidden Germany http://w148.de/~mmartin/public-key.asc