Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15705
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: Backslash missing in brace expansion |
| Date | 2019-12-06 14:14 -0800 |
| Organization | ITS, Case Western Reserve University |
| Message-ID | <mailman.438.1575670451.1979.bug-bash@gnu.org> (permalink) |
| References | (1 earlier) <662e2328-f331-c554-afcf-fd3819f6beab@case.edu> <20191206055304.076d6115afa3a4f2a6a21c34@schrader-schulte.de> <5b5064a8-7175-42e7-1eb5-6374dee6c11e@redhat.com> <21761e28-c496-ff67-d7b7-628c9325085f@iki.fi> <9dd3a388-39b1-c059-de99-813f1e411764@case.edu> |
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/
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: Backslash missing in brace expansion Chet Ramey <chet.ramey@case.edu> - 2019-12-06 14:14 -0800
csiph-web