bug#22071: incorrect behaviour for inverted matches with -l on empty files

2015-12-02 Thread Mark Wotton
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"' ? cheers mark

bug#22071: incorrect behaviour for inverted matches with -l on empty files

2015-12-02 Thread Santiago Ruano Rincón
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 o

bug#22071: incorrect behaviour for inverted matches with -l on empty files

2015-12-02 Thread Mark Wotton
hm. "grep -l '' empty" also doesn't print anything, so I guess it's consistent, at least. On 12/2/15, Santiago Ruano Rincón wrote: > 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 emp

bug#22071: incorrect behaviour for inverted matches with -l on empty files

2015-12-02 Thread Eric Blake
On 12/02/2015 06:14 AM, Mark Wotton wrote: > hm. "grep -l '' empty" also doesn't print anything, so I guess it's > consistent, at least. You want 'grep -L "hi there" ./empty', which says to print the names of all files that did not contain any match (and not the names of all files that had lines t

bug#22071: incorrect behaviour for inverted matches with -l on empty files

2015-12-02 Thread Mark Wotton
Yes, I understand the interpretation now. Just confusing when you have a model in mind that almost always works. On 12/2/15, Eric Blake wrote: > On 12/02/2015 06:14 AM, Mark Wotton wrote: >> hm. "grep -l '' empty" also doesn't print anything, so I guess it's >> consistent, at least. > > You want

bug#22071: incorrect behaviour for inverted matches with -l on empty files

2015-12-02 Thread Paul Eggert
On 12/02/2015 05:57 AM, Mark Wotton wrote: Yes, I understand the interpretation now. Thanks, closing the bug.