help-bash
[Top][All Lists]
Advanced

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

Re: How does {x..y} supposed to work?


From: Greg Wooledge
Subject: Re: How does {x..y} supposed to work?
Date: Thu, 13 May 2021 18:40:08 -0400

On Fri, May 14, 2021 at 12:06:30AM +0200, Alex fxmbsw7 Ratchev wrote:
> btw now better addressed
> 
> you chet said {..} expands early, like before $var can be resolved
> but wouldnt you wanna add {$'\100'..$'\105'} .. those are static
> i thought somehow it did work but for me it didnt now

Brace expansion is done before quote removal, as you can easily see:

unicorn:~$ echo {"a".."d"}
{a..d}

You're simply trying to make things too complicated.  Bash doesn't
support this style, and even if it did, you're only using braces to
generate a list of 6 words which are one character each.  You could
simply type them out:

@ A B C D E

Isn't that a lot nicer than {$'\100'..$'\105'} ?



reply via email to

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