[Toybox] And again.

Chet Ramey chet.ramey at case.edu
Tue Sep 1 07:54:05 PDT 2020


On 9/1/20 4:16 AM, Rob Landley wrote:
> On 8/28/20 1:28 AM, Rob Landley wrote:
>> And I have questions:
> 
> I still have questions, namely what "same type" means for brace expansion:

Right now, it means that both ends of the range must be alphabetic or
both must be digits. It doesn't require the letters be the same case.

> 
> $ echo {z..0}
> {z..0}
> $ echo {z..A}
> z y x w v u t s r q p o n m l k j i h g f e d c b a ` _ ^ ]  [ Z Y X W V U T S R
> Q P O N M L K J I H G F E D C B A
> 
> In between ] and [ there should be \ but apparently it gets eaten silently in
> parsing? I thought I'd check to see if the slash showed back up if given
> something to consume, but:

It's a word consisting solely of an unquoted backslash, which is removed
and becomnes a null argument after quote removal. That's the extra space
between `]' and `[': the null argument.

https://lists.gnu.org/archive/html/bug-bash/2019-12/msg00017.html

> 
> $ echo {z..A}x
> bash: bad substitution: no closing "`" in `x

https://lists.gnu.org/archive/html/bug-bash/2015-07/msg00135.html

This is a long discussion including a spectacularly insane proposal about
unicode and locales:

https://lists.gnu.org/archive/html/bug-bash/2019-12/msg00013.html

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



More information about the Toybox mailing list