[Top][All Lists]

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

Re: problem with pathname expansion

From: vollitwr .
Subject: Re: problem with pathname expansion
Date: Fri, 27 Dec 2013 17:40:57 +0400

2013/12/27 Greg Wooledge <address@hidden>:
> On Fri, Dec 27, 2013 at 07:14:39AM +0400, vollitwr . wrote:
>> It is obvious that letters 'b'
>> and 'B' are different for everybody in any locale
> No, they're the same letter.  One's upper-case and one's lower-case.

Sorry I used not right word I wanted to use word 'symbol'.  'B' and
'b' are different symbols.  We may use equivalence classes.  The
letter gives us such a "natural" class but it is not easy to give its
exact definition.  Should symbol for the Greek letter A be in the same
class with German A,  Russian A, Italian A, ...?  Excuse me this
excessively deep excavation beyond the Unicode ground.  I can only say
that 'B' and 'b' must be different in some context and be the same in
other.  The bash range patterns force only one way.

>> How is it possible to use sequence like aAbBcC... for the
>> range patterns?!

> When you have words in a dictionary, they're in alphabetical order,
> yes?  But the case of the letters is not relevant.

> ...
> bar
> barb
> Barbara
> barn
> barnacle
> Barney
> barometer
> baron
> ...
> Mixed-case locale ordering is how words are usually sorted by everyone
> who isn't an old-school computer programmer.

It is obvious. :-) IMHO the order for sort and the order for range are
not the same things and they may be set as different.  For example,
you may want to find word like 'Baron' (Gironde, France) not 'baron'
by range pattern [A-C]????.

> When I type "ls" my files are sorted in a similar way:
> $ ls
> ...
> xclip-0.12.tar.gz
> xengine_1.11.orig.tar.gz
> XF86Config
> Xf86.0.log
> xlockmore-5.02-README
> ...
> If you don't like this behavior, then you can set LC_COLLATE=C or
> whatever.  This will change the ordering back to "all capital letters
> come before all lower-case letters because of the arbitrary numerical
> assignments of ASCII".
> ...
> XF86Config
> Xf86.0.log
> ...
> xclip-0.12.tar.gz
> xengine_1.11.orig.tar.gz
> xlockmore-5.02-README
> ...

It is again a way for sort.  I am about a way to seek.

> Or, you can install the Bash 4.3 prerelease and use the new
> globasciiranges option.  There's even a compile-time option to make that
> the default.

Thank you very much.  This option solves the problem! :-) I have just
wanted to give the idea of it. ;-)

Thanks for all!

reply via email to

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