Your message dated Fri, 5 Apr 2024 23:52:15 +0200
with message-id <[email protected]>
and subject line Re: : Bug#510089: Parameter expansion with negative offset 
does not work
has caused the Debian Bug report #510089,
regarding bash: Parameter expension with negative offset does not work
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
510089: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=510089
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: bash
Version: 3.1dfsg-8
Severity: minor

$ foo=bar
$ echo ${foo:-1:1}
bar

appears not to work as expected per man page:

"If offset evaluates to a number less than zero, the value is used as an offset 
from the end of the value of parameter. 

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.24.2
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages bash depends on:
ii  base-files             4.0.1~bpo40+1     Debian base system miscellaneous f
ii  debianutils            2.17              Miscellaneous utilities specific t
ii  libc6                  2.3.6.ds1-13etch8 GNU C Library: Shared libraries
ii  libncurses5            5.5-5             Shared libraries for terminal hand

bash recommends no packages.

-- no debconf information

-- 
Allan Wind
Life Integrity, LLC
http://lifeintegrity.com




--- End Message ---
--- Begin Message --- On Sun, 28 Dec 2008 23:04:01 -0500 Allan Wind <[email protected]> wrote:
It should have been:

$ foo=bar
$ ${foo: -1:2}
r

Yes, the manual states:

Note that a negative offset must be separated from the colon by at
least one space to avoid being confused with the :- expansion.
--
Gioele Barabucci

--- End Message ---

Reply via email to