[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#33249: [PATCH] grep: grouping of patterns including back reference
From: |
Norihiro Tanaka |
Subject: |
bug#33249: [PATCH] grep: grouping of patterns including back reference |
Date: |
Sun, 04 Nov 2018 13:25:55 +0900 |
On Sat, 3 Nov 2018 21:02:19 -0700
Paul Eggert <address@hidden> wrote:
> Norihiro Tanaka wrote:
> > Even the pattern has no back-references, compilation by regex run for
> > each line. So Syntax errors will be detected as even your present.
>
> OK, but then I'm afraid I don't understand the motivation for the patch.
> Perhaps if you gave a self-contained example? The examples in the original
> bug report are incomplete because they're missing the pattern file; when I
> tried the first one I observed this:
>
> $ yes 00000000000000000000000000000000000000000x | head -10 >in
> $ time -p env LC_ALL=C grep -f pat in
> grep: pat: No such file or directory
> real 0.00
> user 0.00
> sys 0.00
Sorry, It's missing. The pattern for all cases is as following.
$ seq -f '%040g' 0 9999 | sed '1s/$/\\(0\\)\\1/' >pat
Norihiro