Comment 4 for bug 1071447

Revision history for this message
Miguel J (mjulier) wrote :

I encountered this bug too, and it broke several scripts in my set-up.

It seems that, when no input files are given (meaning input from standard input, or pipe), "grep -r" and "rgrep" search from "*": all the files in the current directory.

This is an easy workaround, that does not break any compatibility: add "-" at the end of the command (meaning: the input is the standard input).

$ grep -r 'end$' -
No match: this line will not be printed
Match: this line will be printed because of its end
Match: this line will be printed because of its end

$ rgrep --version
grep (GNU grep) 2.12