[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Backslash missing in brace expansion
From: |
Chet Ramey |
Subject: |
Re: Backslash missing in brace expansion |
Date: |
Fri, 6 Dec 2019 14:14:00 -0800 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 |
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/
- Backslash missing in brace expansion, Martin Schulte, 2019/12/05
- Re: Backslash missing in brace expansion, Chet Ramey, 2019/12/05
- Re: Backslash missing in brace expansion, Martin Schulte, 2019/12/05
- Re: Backslash missing in brace expansion, Chet Ramey, 2019/12/06
- Re: Backslash missing in brace expansion, Eric Blake, 2019/12/06
- Re: Backslash missing in brace expansion, Ilkka Virta, 2019/12/06
- Re: Backslash missing in brace expansion,
Chet Ramey <=
- Re: Backslash missing in brace expansion, Martin Schulte, 2019/12/08
- Re: Backslash missing in brace expansion, Andreas Kusalananda Kähäri, 2019/12/08
- Not missing, but very hard to see (was Re: Backslash missing in brace expansion), L A Walsh, 2019/12/12
- Re: Not missing, but very hard to see (was Re: Backslash missing in brace expansion), Greg Wooledge, 2019/12/12
- Re: Not missing, but very hard to see (was Re: Backslash missing in brace expansion), Ilkka Virta, 2019/12/12
- Re: Not missing, but very hard to see (was Re: Backslash missing in brace expansion), L A Walsh, 2019/12/12
- Re: Not missing, but very hard to see (was Re: Backslash missing in brace expansion), Eli Schwartz, 2019/12/12
- unquoted expansion not working (was Re: Not missing, but very hard to see), L A Walsh, 2019/12/13
- Re: unquoted expansion not working (was Re: Not missing, but very hard to see), Greg Wooledge, 2019/12/13
- Re: unquoted expansion not working (was Re: Not missing, but very hard to see), L A Walsh, 2019/12/14