Hello,

I don't know if I've found an "unexpected feature", a bug in find, in
the manual or in me:

If I execute (for example in /usr/share/doc, in a Debian system with
find from findutils 4.4.0):

find . -type f -iname "*copy*" -or -iname "*changelog*" | wc -l
Result: 4619

If I execute:
find . -type f -iname "*copy*" -or -iname "*changelog*" -exec echo {}
\;|wc -l
Result: 2841

Visually checking I can see that echo {} is executed only for
*changelog* files, not for *copy* files.

I can get what I wanted executing:

find . -type f -iname "*copy*" -exec echo {} \; -or -iname "*changelog*"
-exec echo {} \; | wc -l
Result: 4619

(of course, I was not executing echo {} for each file, this is just a
test case)

Is this a bug in the manual? In find? In me? :-)
If it's in find looks a bit important...

Thanks and sorry for the noise, specially if this is not a bug.

-- 
Carles Pina i Estany            GPG id: 0x17756391
        http://pinux.info


Reply via email to