[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Infinite loop in bash glob matching
From: |
Chet Ramey |
Subject: |
Re: Infinite loop in bash glob matching |
Date: |
Wed, 17 May 2017 11:48:47 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 |
On 5/17/17 10:52 AM, Eduardo Bustamante wrote:
> Then in "9.3.5 RE Bracket Expression"
> (http://pubs.opengroup.org/onlinepubs/9699919799.2008edition/basedefs/V1_chap09.html#tag_09_03_05),
>
> The character sequences "[." , "[=" , and "[:" ( <left-square-bracket>
> followed by a <period>, <equals-sign>, or <colon>) shall be special inside
> a bracket expression and are used to delimit collating symbols,
> equivalence
> class expressions, and character class expressions. These symbols shall be
> followed by a valid expression and the matching terminating sequence ".]"
> ,
> "=]" , or ":]" , as described in the following items.
I read this as saying that it's a requirement on the application to ensure
that character classes are correctly formed, and it's unspecified behavior
if they're not.
So you're right: people should not count on shells treating improperly-
formed character classes as literal characters.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
- Infinite loop in bash glob matching, Zoltán Herczeg, 2017/05/16
- Re: Infinite loop in bash glob matching, Eduardo Bustamante, 2017/05/16
- Re: Infinite loop in bash glob matching, Daniel Mills, 2017/05/16
- Re: Infinite loop in bash glob matching, Zoltán Herczeg, 2017/05/16
- Re: Infinite loop in bash glob matching, Eduardo Bustamante, 2017/05/17
- Re: Infinite loop in bash glob matching,
Chet Ramey <=
- Re: Infinite loop in bash glob matching, Zoltán Herczeg, 2017/05/18
- Re: Infinite loop in bash glob matching, Greg Wooledge, 2017/05/18
- Re: Infinite loop in bash glob matching, Chet Ramey, 2017/05/18