bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bash removes unrequested characters in bracket expressions (not a ra


From: Chet Ramey
Subject: Re: Bash removes unrequested characters in bracket expressions (not a range).
Date: Wed, 28 Nov 2018 08:59:03 -0800

On 11/28/18 2:29 AM, Bize Ma wrote:
> Chet Ramey (<chet.ramey@case.edu <mailto:chet.ramey@case.edu>>) wrote:
> 
>     On 11/24/18 4:32 PM, Bize Ma wrote:
> 
>  [...]
> 
>     > I have been made aware that there is a
>     >       cstart = cend = FOLD (cstart);
>     > inside the `sm_loop.c` file that will convert into a range many
>     > individual character. If that understanding is correct that is the
>     > source of the difference with other shells.
> 
>     I'm not sure what you mean by "convert into a range." If cstart and cend
>     were treated as a range, the start end and end characters would be the
>     same. If cstart == cend, a character that collates >= cstart and <= cend
>     would have to collate equal to cstart and cend.
> 
> 
> Yes, exactly, a range where the start and the end are the same.

A range like that is exactly equivalent to a single ordinary character.

POSIX: "An ordinary character in the list should only match that character,
but may match any single character that collates equally with that
character"

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]