I fear this is no bug but intended behavior.  ;-)
Take a look at the manual page, especially precedence of operators.

'expr1 expr2' has a higher precedence then 'expr -or expr2'.
Thus your command is like

  find . ( -name a ) -or ( -name b -exec echo {} \; )

i.e. the exec only applies for the last operand. To do what you indent,
you have to force presedence like

$ find . \( -name b -or -name a \) -exec echo {} \;
./b
./a

Thus I'll close the bug as 'rejected'. If you still feel this is a bug
feel free to reopen it. Thank you.

** Changed in: findutils (Ubuntu)
       Status: Unconfirmed => Rejected

-- 
find with -or and -exec doesn't report all matches
https://launchpad.net/bugs/55764

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to