[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Backslash missing in brace expansion
From: |
Martin Schulte |
Subject: |
Re: Backslash missing in brace expansion |
Date: |
Fri, 6 Dec 2019 05:53:04 +0100 |
Hi Chet, hi all!
On Thu, 5 Dec 2019 12:01:31 -0800
Chet Ramey <chet.ramey@case.edu> wrote:
> On 12/5/19 11:11 AM, Martin Schulte wrote:
> > Hello,
> >
> > please have a look:
> >
> > $ uname -a
> > Linux martnix4 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3+deb9u2
> > (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:
$ echo {Z..a}
Z [ ] ^ _ ` a
$ echo Z [ \ ] ^ _ ` a
>
Best regards,
Martin
- 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 <=
- 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, 2019/12/06
- 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