Re: Mishandled backslashes in patternvar in ${var#...$patternvar...} ?
From:
Robert Elz
Subject:
Re: Mishandled backslashes in patternvar in ${var#...$patternvar...} ?
Date:
Sat, 09 Aug 2025 14:22:32 +0700
Date: Sat, 9 Aug 2025 01:35:17 +0200
From: Denys Vlasenko <dvlasenk@redhat.com>
Message-ID: <f7ec2956-dfeb-af4e-d314-937f36424400@redhat.com>
Incidentally, I think you have a typo in this case:
| echo '${a##\\\*} removes \*: '"|${a##\\*}|"' - matches \, then *'
The expression on the right has just two \ in it, not three, as
the echo says should be present, which explains the apparent odd
result for that one.
kre