GNU bug report logs - #63819
Gnu `grep '.*'` does not match an empty string.

Previous Next

Package: grep;

Reported by: "Bob Vincent Il (US)" <robert.a.vincent.ii <at> pwc.com>

Date: Wed, 31 May 2023 23:02:02 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: "Bob Vincent Il (US)" <robert.a.vincent.ii <at> pwc.com>
Cc: 63819-done <at> debbugs.gnu.org
Subject: Re: bug#63819: Gnu `grep '.*'` does not match an empty string.
Date: Wed, 31 May 2023 20:15:30 -0700
On 2023-05-31 19:17, Bob Vincent Il (US) wrote:
> Okay, but `echo ''` does not output an empty string. It outputs a line feed character.

The line feed is not considered. Grep looks only for matches of "any 
part of the line excluding the terminating <newline>" 
<https://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html>.

Closing the bug report as it appears to be due to a misunderstanding of 
how 'grep' works.




This bug report was last modified 2 years and 51 days ago.

Previous Next


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