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

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1071447

Title:
  [bug] grep -r [ with / without piping ]

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grep/+bug/1071447/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to