On 5/13/24 12:04 PM, Andreas Schwab wrote:
In 5.3-alpha, it is no longer possible to quote the special % and # characters in a pattern replacement expansion.$ a=1/%2/%3 $ echo "${a/\%/##}" 1/%2/%3##
Interesting. This is actually the result of the (seemingly unrelated) https://lists.gnu.org/archive/html/bug-bash/2023-07/msg00115.html The fix for this issue is to make sure that backslashes preceding `%' and `#' are not removed. That should take care of pattern substitution and pattern removal. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/
