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