Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15702 > unrolled thread
| Started by | Eric Blake <eblake@redhat.com> |
|---|---|
| First post | 2019-12-06 13:36 -0600 |
| Last post | 2019-12-06 13:36 -0600 |
| 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.
Re: Backslash missing in brace expansion Eric Blake <eblake@redhat.com> - 2019-12-06 13:36 -0600
| From | Eric Blake <eblake@redhat.com> |
|---|---|
| Date | 2019-12-06 13:36 -0600 |
| Subject | Re: Backslash missing in brace expansion |
| Message-ID | <mailman.429.1575660997.1979.bug-bash@gnu.org> |
On 12/5/19 10:53 PM, Martin Schulte wrote:
>>> (2019-11-11) x86_64 GNU/Linux $ echo ${BASH_VERSINFO[@]}
>>> 4 4 12 1 release x86_64-pc-linux-gnu
>>> $ set -x
>>> $ echo {Z..a}
>>> + echo Z '[' '' ']' '^' _ '`' a
>>> Z [ ] ^ _ ` a
>>>
>>> It looks as if the backslash (between [ and ] in ASCII code) is
>>> missing in brace expansion. The same behaviour seems to be found in
>>> bash 5.0.
>>
>> It's an unquoted backslash, which is removed by quote removal when the
>> words are expanded. Look at the extra space between `[' and `]'; that's
>> the null argument resulting from the unquoted backslash.
>
> 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
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
Back to top | Article view | gnu.bash.bug
csiph-web