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

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to