On Sat, Sep 13, 2014 at 8:45 AM, Edward Ned Harvey (lopser) <
[email protected]> wrote:
> Actually, I got it: For some reason, the find command itself finds
> "file-io.c" in its results, but when I do "-exec" then it only results in
> '*.h' files printing out. I'm reasonably certain that's a bug in the
> 'find' utility.
>
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
If you omit the predicate, GNU find assumes -print... but this interacts
oddly with precedence, and leads to all the earlier -or-s having no action
associated and only the last (in your case -name '*.h') getting -print
applied to it.
--
brandon s allbery kf8nh sine nomine associates
[email protected] [email protected]
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
_______________________________________________
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/