bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #27770] grep does not print warning when recursively grepping stdin


From: anonymous
Subject: [bug #27770] grep does not print warning when recursively grepping stdin
Date: Wed, 21 Oct 2009 15:43:19 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/532.3 (KHTML, like Gecko) Chrome/4.0.223.5 Safari/532.3

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/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]