bug-bash
[Top][All Lists]
Advanced

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

Re: nocaseglob doesn't always work as expected.


From: pk
Subject: Re: nocaseglob doesn't always work as expected.
Date: Wed, 08 Dec 2010 15:51:51 -0000
User-agent: KNode/4.4.5

Alexey Vinogradov wrote:

> But the range search here is thow out only non-capital "bigstore" from the
> listing, and still included both-cased files begin with c/C.
> The fact that 'c' is in the range "B-C" looks really strange. I would
> expect that this range contains only "B" and C" letters.
> 
> However, when directly enumerating the letters, all works ok:
> 
> address@hidden:/tmp$ shopt -u nocaseglob; shopt -s nullglob; for a in
> [BC]* ; do echo $a; done
> Code::Blocks-alexey
> CODEBLOCKS.socket

This is expected behavior (though I agree one may regard it as a bug). The 
characters included in a range like [A-Z] or [B-C] is locale-dependent.
See this page for more info:

http://www.gnu.org/software/coreutils/faq/coreutils-faq.html#Sort-does-not-
sort-in-normal-order_0021


reply via email to

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