Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15705 > unrolled thread

Re: Backslash missing in brace expansion

Started byChet Ramey <chet.ramey@case.edu>
First post2019-12-06 14:14 -0800
Last post2019-12-06 14:14 -0800
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Backslash missing in brace expansion Chet Ramey <chet.ramey@case.edu> - 2019-12-06 14:14 -0800

#15705 — Re: Backslash missing in brace expansion

FromChet Ramey <chet.ramey@case.edu>
Date2019-12-06 14:14 -0800
SubjectRe: Backslash missing in brace expansion
Message-ID<mailman.438.1575670451.1979.bug-bash@gnu.org>
On 12/6/19 12:29 PM, Ilkka Virta wrote:

>>> Yes - sure. But then I'm wondering why the unquoted backtick doesn't
>>> start command substitution:
>>
>> It may be version dependent:
>>
>> $ echo ${BASH_VERSINFO[@]}
>> 5 0 7 1 release x86_64-redhat-linux-gnu
>>
>> $ echo b{Z..a}d
>> bash: bad substitution: no closing "`" in `d
> 
> I get that with 4.4 and 'echo b{Z..a}d' too, the trailing letter seems to
> trigger it.

That's an implementation decision bash makes. What you get from the above
brace expansion is the list

bZa, b[a, b\a, b]a, b^a, b_a, b`a, baa

As I said in the previous message, the expansion code leaves a single "`"
unchanged (it always has), but throws an error when it's an unterminated
command substitution that's more than a bare backquote.


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

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web