bug-grep
[Top][All Lists]
Advanced

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

[bug #39706] Does not return filename if only one file matches pattern


From: Eric Blake
Subject: [bug #39706] Does not return filename if only one file matches pattern
Date: Tue, 06 Aug 2013 14:17:27 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:22.0) Gecko/20100101 Firefox/22.0

Follow-up Comment #1, bug #39706 (project grep):

Not a bug; this behavior is required by POSIX.  That's why you'll often find
recipes such as:

xargs grep $pattern /dev/null

which combines /dev/null (which will never match) along with your list
(possible one file long) from xargs, so that grep sees at least two files, and
starts listing file names.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?39706>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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