both `find` and `grep -r` are recursive, so even if they plan to filter symlinks out of their potential results, they are still traversing through symlinked directories searching, hence the loop problem. (This is my take on it anyhow).
Therefore, maybe use `find` to do the recursing, but remove the -r from `grep` and see what happens -- if you're recursing using `find`, there's no need for `grep` to also recurse..
If find (continues to or does) have problem of recursive loop, you'll need to give it finer-grained instructions to eliminate the problem. I just tested, and while `grep` issues the warning about the recursive loop, the `find` command is immune. So, since you're grepping through files anyhow, you could use `find` to find all aptly-named files, and either use find's -exec option to run the grepping, or pipe the find output into `xargs` and do the grep from there.
Last edited by GrapefruiTgirl; 10-15-2010 at 03:18 PM.