On Wed, Dec 3, 2014 at 7:05 AM,  <santi...@debian.org> wrote:
> I'm forwarding a bug report filed in debian. Is this the expected
> behavior?
>
> /tmp/greptest %  dpkg -l | grep -r grep
> wtf:hello grep
> /tmp/greptest %  dpkg -l | grep grep
> ii  grep                                                        2.21-1
> amd64        GNU grep, egrep and fgrep
>
> grep -r takes the current dir as input instead of stdin.

Hi Santiago,

That is the expected/documented behavior.
It was changed upstream 2.5 years ago (as seen in the NEWS file):

* Noteworthy changes in release 2.11 (2012-03-02) [stable]

** Bug fixes
...
** New features

  If no file operand is given, and a command-line -r or equivalent
  option is given, grep now searches the working directory.  Formerly
  grep ignored the -r and searched standard input nonrecursively.
  An -r found in GREP_OPTIONS does not have this new effect.
--------------------

Note that GREP_OPTIONS has recently been deprecated,
so this functionality will disappear.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to