URL:
<http://savannah.gnu.org/bugs/?27770>
Summary: grep does not print warning when recursively
grepping stdin
Project: grep
Submitted by: None
Submitted on: Wed 21 Oct 2009 15:43:18 UTC
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
Originally reported downstream at https://bugs.launchpad.net/bugs/457277
A common user error pattern is to call a recursive grep and miss off the
trailing '.' for current directory. This causes grep to wait indefinitely for
stdin, but users will presume it is just taking a long time to search and will
leave it running
$ grep -r PATTERN
...
...
...<indefinite pause>
This is on Ubuntu karmic running the latest GNU grep 2.5.4
Contrastingly, on a Apple Mac running OS X and grep (GNU grep) 2.5.1 a
helpful warning is printed in this case which immediately guides the user to
their mistake
$ grep -r PATTERN
grep: warning: recursive search of stdin
I presume this is a custom patch that has been applied to the grep binary
that ships with OSX (rather than a warning message that has been purposefully
removed), therefore I suggest this warning message is added to the default
code base.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?27770>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/