bug-grep
[Top][All Lists]
Advanced

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

bug#29613: Debian Bug#883733: grep returns 0 even if there is no match


From: Paul Eggert
Subject: bug#29613: Debian Bug#883733: grep returns 0 even if there is no match
Date: Fri, 8 Dec 2017 10:34:53 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 12/08/2017 03:11 AM, Santiago R.R. wrote:
$ echo 1111111111111 | grep -E '^(11+)\1+$|^1?$' ; echo $?
1111111111111
0

Shouldn't the last grep command exit 1 too?

Yes it should. This appears to be due to a longstanding bug in the glibc regular expression matcher. See:

https://sourceware.org/bugzilla/show_bug.cgi?id=11053






reply via email to

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