Hello,
On Sep/14/2008, James Youngman wrote:
> On Sun, Sep 14, 2008 at 3:45 PM, Carles Pina i Estany <[EMAIL PROTECTED]>
> wrote:
> > If I execute:
> > find . -type f -iname "*copy*" -or -iname "*changelog*" -exec echo {}
> > \;|wc -l
> > Result: 2841
>
> Yup, because this is equivalent to
>
> find . -type f -iname "*copy*" -or \( -iname "*changelog*" -exec echo {} \)
Curios... this command only prints *changelog* files, not *copy* files.
I would expect (I haven't checked the manual) printing to stdout the
*copy* files (default behaviour) and execute the -exec echo for the
*changelog* files...
> ... since the (implicit) and operator has higher precedence than -or.
> See "OPERATORS" in the manual page - or if you are reading the
> Texinfo manual, "Combining Primaries With Operators".
Thank you very much. It was clearly my mistake.
--
Carles Pina i Estany GPG id: 0x17756391
http://pinux.info