[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19261: Recursive grep even when content on stdin
From: |
santiago |
Subject: |
bug#19261: Recursive grep even when content on stdin |
Date: |
Wed, 3 Dec 2014 16:05:10 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Hi,
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.
Regards,
Santiago
----- Forwarded message from address@hidden -----
Date: Tue, 2 Dec 2014 21:38:51 +0200
From: address@hidden
To: address@hidden
Subject: Bug#414168: Recursive grep even when content on stdin
X-Mailer: Sylpheed 3.4.2 (GTK+ 2.24.22; amd64-portbld-freebsd9.3)
Hello
Since wheezy (grep 2.12-2) a patch like this has apparently been merged.
I'm not seeing it documented on the man page. (Shouldn't it be?)
This is undesirable for those of us who use shell aliases.
For example, I use
alias grep='grep -rI --exclude-dir=.svn'
Try the following sequence of commands:
mkdir /tmp/greptest
cd /tmp/greptest
echo hello grep > wtf
alias grep='grep -r'
dpkg -l | grep grep
Expected results:
ii grep 2.12-2 amd64 GNU grep, egrep and fgrep
Actual results:
wtf:hello grep
It seems GREP_OPTIONS is special-cased, and I can move the switches
there as a workaround.
----- End forwarded message -----
- bug#19261: Recursive grep even when content on stdin,
santiago <=