bug-grep
[Top][All Lists]
Advanced

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

bug#41700: grep -v always exiting with 1 for empty file


From: Paul Eggert
Subject: bug#41700: grep -v always exiting with 1 for empty file
Date: Thu, 4 Jun 2020 12:19:14 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

On 6/4/20 7:06 AM, Andi Kleen wrote:
> I would argue that a empty file has a single empty line.

No, an empty file has no lines. A single empty line would be a file of size 1,
containing just a newline byte.

> Besides it completely breaks the "is foo not in file" functionality.

That's not what -v is for. -v asks "is not-FOO in file". If you want "is FOO not
in file", use -L.





reply via email to

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