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    c...@case.edu    http://tiswww.cwru.edu/~chet/

Reply via email to