i think this would be the upstream bug (note: the comments are sorted newest first): http://savannah.gnu.org/bugs/?17457
strangely the mailing list thread for this bug goes longer than the actual bug: report http://www.mail-archive.com/bug- g...@gnu.org/msg00770.html bottom line seems to be that this behaviour is by design (it's not a bug, it's a feature). when you redirect the results of grep into a file, and grep comes around to look at that file, then grep will find occurences infinitely. why this does not occur all the time seems to be a side effect of some buffers. @Vaneet Dadra you can prevent the infinite loop by redirecting the results to a file outside or above the tree you are grepping: $ grep MAX -r somedirectory > ../somefile ** Bug watch added: GNU Savannah Bug Tracker #17457 http://savannah.gnu.org/bugs/?17457 -- command "grep" or redirection going in a loop. https://bugs.launchpad.net/bugs/245940 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs