[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#22071: incorrect behaviour for inverted matches with -l on empty fil
From: |
Mark Wotton |
Subject: |
bug#22071: incorrect behaviour for inverted matches with -l on empty files |
Date: |
Wed, 2 Dec 2015 08:14:05 -0500 |
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 <address@hidden> 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 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
>
--
A UNIX signature isn't a return address, it's the ASCII equivalent of a
black velvet clown painting. It's a rectangle of carets surrounding a
quote from a literary giant of weeniedom like Heinlein or Dr. Who.
-- Chris Maeda