GNU bug report logs - #33972
grep -vf <(<nothing>) filters all rows

Previous Next

Package: grep;

Reported by: luke <at> gavelfamily.com

Date: Fri, 4 Jan 2019 05:16:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 33972-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: luke <at> gavelfamily.com
Cc: 33972-done <at> debbugs.gnu.org
Subject: grep -vf <(<nothing>) filters all rows
Date: Thu, 2 Jan 2020 01:04:21 -0800
> I have to pre-check for an empty set before passing it to grep:
> ...
> Workaround:

You're right that the empty pattern matches every line, since every line has an
empty string in it somewhere. This is considered to be a feature of grep, not a
bug. As you have a workaround I'm closing the bug report.




This bug report was last modified 5 years and 194 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.