[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: String substitution bug
From: |
Lawrence Velázquez |
Subject: |
Re: String substitution bug |
Date: |
Mon, 25 Nov 2024 15:18:17 -0500 |
On Mon, Nov 25, 2024, at 2:18 PM, marcel.plch via Bug reports for
the GNU Bourne Again SHell wrote:
> Not in one place the pattern "[[:space:]]" is mentioned.
Why should the "space" character class be called out in particular?
It's not special.
> If adding just one sentence containing "[[:space:]]" to
> clarify the section a tiny bit more, I think that
> it is well worth it.
I'm not opposed to modest clarification, but mentioning "[[:class:]]"
would be misleading because it would give the impression that
character class expressions must occur alone within their bracket
expressions. "Mixed" bracket expressions are valid:
$ unset IFS
$ LC_ALL=C
$ foo='a b c d e f g h i j k l m n o p'
$ printf '<%s>\n' "${foo%%[![:blank:]abc[=d=]e-g[.h.]]*}"
<a b c d e f g h >
Martin's suggestion of "[...[:class:]...]" would be more honest.
--
vq
- Re: String substitution bug, (continued)
- Re: String substitution bug, Martin D Kealey, 2024/11/25
- Re: String substitution bug, Greg Wooledge, 2024/11/24
- Re: String substitution bug, Andreas Kähäri, 2024/11/24
- Re: String substitution bug, Lawrence Velázquez, 2024/11/24
- Re: String substitution bug, Andreas Kähäri, 2024/11/25
- Re: String substitution bug, Martin D Kealey, 2024/11/25
- Re: String substitution bug, Zachary Santer, 2024/11/24
- Re: String substitution bug, Andreas Kähäri, 2024/11/25
- Re: String substitution bug, Chet Ramey, 2024/11/25
- Re: String substitution bug, marcel.plch, 2024/11/25
- Re: String substitution bug,
Lawrence Velázquez <=
- Re: String substitution bug, Lawrence Velázquez, 2024/11/25
- Re: String substitution bug, Chet Ramey, 2024/11/25
- Re: String substitution bug, Chet Ramey, 2024/11/25
Re: String substitution bug, Wiley Young, 2024/11/26