> From: Brandon Allbery [mailto:[email protected]]
>
> Nope; bug in your brain. As soon as you start using -o / -or, you need to deal
> with precedence.
>
> find . \( -name '*.[ch]' -o -name '*.cs' \) -print
Bahhh! Thank you. That was very non-intuitive. In fact, either using
parentheses, or specifying multiple "-exec"s solves the problem. Thank you.
(Or in the case where I was using "echo {}" for testing purposes, then
specifying multiple "-print"s would solve it)
find . \( -name '*.cs' -or -name '*.c' -or -name '*.h' \) -exec grep -l
LockFile {} \;
or
find . -name '*.cs' -exec grep -l LockFile {} \; -or -name '*.c' -exec grep -l
LockFile {} \; -or -name '*.h' -exec grep -l LockFile {} \;
_______________________________________________
Tech mailing list
[email protected]
https://lists.lopsa.org/cgi-bin/mailman/listinfo/tech
This list provided by the League of Professional System Administrators
http://lopsa.org/