[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug on {,} : result of {,10} compar to {5,10},
From: |
Eric Blake |
Subject: |
Re: bug on {,} : result of {,10} compar to {5,10}, |
Date: |
Thu, 18 Apr 2013 09:24:16 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 |
On 04/17/2013 10:36 PM, Guillaume Moulard wrote:
> Hi,
>
> I'm suprise by the result of {,10} compar to {5,10}, I think is on bug. but
> peraprs, my regular experience is to bad :)
For ERE, POSIX only defines:
...an interval expression of the format "{m}" , "{m,}" , or "{m,n}"
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html
{,10} is therefore undefined by POSIX. It would make the most sense if
grep treats it like {0,10}, but you cannot rely on that interpretation
in portable code. It looks like grep is actually treating it like
\{,10}, and failing to find a literal sequence of '{', ',', '1', '0',
'}', your output is explainable if not intuitive.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- bug on {,} : result of {,10} compar to {5,10},, Guillaume Moulard, 2013/04/18
- Re: bug on {,} : result of {,10} compar to {5,10},,
Eric Blake <=
- Re: bug on {,} : result of {,10} compar to {5,10},, Paul Eggert, 2013/04/18
- Re: bug on {,} : result of {,10} compar to {5,10},, Eric Blake, 2013/04/18
- Re: bug on {,} : result of {,10} compar to {5,10},, Paul Eggert, 2013/04/18
- Re: bug on {,} : result of {,10} compar to {5,10},, Guillaume Moulard, 2013/04/19
- Prev by Date:
bug on {,} : result of {,10} compar to {5,10},
- Next by Date:
Re: bug on {,} : result of {,10} compar to {5,10},
- Previous by thread:
bug on {,} : result of {,10} compar to {5,10},
- Next by thread:
Re: bug on {,} : result of {,10} compar to {5,10},
- Index(es):