GNU bug report logs - #22071
incorrect behaviour for inverted matches with -l on empty files

Previous Next

Package: grep;

Reported by: Mark Wotton <mwotton <at> gmail.com>

Date: Tue, 1 Dec 2015 22:47:02 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


Message #8 received at 22071 <at> debbugs.gnu.org (full text, mbox):

From: Santiago Ruano Rincón <santiagorr <at> riseup.net>
To: Mark Wotton <mwotton <at> gmail.com>
Cc: 22071 <at> debbugs.gnu.org
Subject: Re: bug#22071: incorrect behaviour for inverted matches with -l on
 empty files
Date: Wed, 2 Dec 2015 13:56:48 +0100
El 01/12/15 a las 22:36, Mark Wotton escribió:
> orb ➜  ~/src/grep-2.22  touch empty
> orb ➜  ~/src/grep-2.22  ./src/grep -v -l "hi there" ./empty
> 
> gives empty output. Surely the file "empty" should match 'does not match
> "hi there"' ?
       -v, --invert-match
              Invert the sense of matching, to select non-matching lines.

I think this is not a bug because there isn't non-matching line in an empty file.

Cheers,

-- Santiago




This bug report was last modified 9 years and 170 days ago.

Previous Next


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