On 5/22/18 6:32 AM, Joerg Schilling wrote:

>> bash's [a-z] still matches on A..Y or B..Z though (source of
>> much consusion, many bugs and lots of ranting), and that
>> makes me realise that bash is actually one of those utilities
> 
> This strange and unexpected behavior did cause once that bash removed 
> important 
> files for me. Sorry, I don't remember which locale I used at that time.

Bash's bracket expression range expressions use the collating sequence,
as Posix specifies (though Posix limits its definition to the Posix
locale), so any locale that collates like aAbBcC...zZ will pick up
upper and lower case characters.

There is a shell option that allows you to control the behavior.

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

Reply via email to