bug-bash
[Top][All Lists]
Advanced

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

Re: {A..z} brace expansion in Bash 3


From: Chet Ramey
Subject: Re: {A..z} brace expansion in Bash 3
Date: Sun, 01 Aug 2004 18:18:28 -0400
User-agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.6) Gecko/20040113

Paul Jarc wrote:

$ echo {Ä..D}
That's accepted and produces output that seems to wrap round to ^A and
then goes up to D. Note that I'm using an ISO-8859-1 locale. If that
works at all, it should surely descend.

If the first number or letter in the sequence evaluates greater than
the second, it will descend.

I will take a look, but it would help to know exactly which locale.

Ä is greater than D, so it should descend, but Oliver says it ascends
and wraps.  I'm using the C locale, and it doesn't expand at all.
$ eval $'echo {\xC4..D}'
{Ä..D}

Since only alphas and digits are accepted, if isalpha() doesn't return
true for 0xc4 (which it will not in the C locale), the shell will not
treat it as a valid sequence expression.

Presumably it returns true in Oliver's locale.

Is there any way to get a range with "," or "." as one endpoint?

No.  Currently, only letters and digits are allowed.

Chet




reply via email to

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