Package: bash
Version: 5.3~alpha1-1
Severity: important

Dear bash maintainers,

bash version 5.3~alpha1-1 in experimental seems to break replacing a 
percentage sign in variables. The sign doesn't get removed when replacing:

-8<-
pyksy@hanuri:~$ LOSS='10%'
pyksy@hanuri:~$ echo "${LOSS}"
10%
pyksy@hanuri:~$ LOSS="${LOSS/\%/}"
pyksy@hanuri:~$ echo "${LOSS}"
10%

pyksy@hanuri:~$ LOSS='10%'
pyksy@hanuri:~$ echo "${LOSS}"
10%
pyksy@hanuri:~$ LOSS="${LOSS/\%/foo}"
pyksy@hanuri:~$ echo "${LOSS}"
10%foo
-8<-

Whereas with bash version 5.2.32-1 and earlier, the percentage sign 
does get removed when replacing:
-8<-
pyksy@hanuri:~$ LOSS='10%'
pyksy@hanuri:~$ echo "${LOSS}"
10%
pyksy@hanuri:~$ LOSS="${LOSS/\%/}"
pyksy@hanuri:~$ echo "${LOSS}"
10

pyksy@hanuri:~$ LOSS='10%'
pyksy@hanuri:~$ echo "${LOSS}"
10%
pyksy@hanuri:~$ LOSS="${LOSS/\%/foo}"
pyksy@hanuri:~$ echo "${LOSS}"
10foo
-8<-

This bug breaks some of my scripts.

Let me know if I can be of assistance.

Thanks,
--Antti

-- System Information:
Debian Release: trixie/sid
  APT prefers buildd-unstable
  APT policy: (500, 'buildd-unstable'), (500, 'unstable'), (1, 
'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.9.8-amd64 (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=fi_FI.utf8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages bash depends on:
ii  base-files   13.5
ii  debianutils  5.20
ii  libc6        2.39-7
ii  libtinfo6    6.5-2

Versions of packages bash recommends:
ii  bash-completion  1:2.14.0-1

-- no debconf information

Reply via email to