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: Paul Jarc
Subject: Re: {A..z} brace expansion in Bash 3
Date: Sun, 01 Aug 2004 17:28:33 -0400
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux)

Chet Ramey <chet.ramey@case.edu> wrote:
> Oliver Kiddle wrote:
>> It does things like this:
>> $ echo {Z..a}
>> Z [  ] ^ _ a
>
> If you wish to shoot yourself in the foot, bash will not stop you.
> It might even load the gun for you.  :-)

But shouldn't \ and ` appear in there?

>> $ 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.

Ä 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}

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


paul




reply via email to

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