GNU bug report logs - #78329
bash extraction of segment from end of string returns full string

Previous Next

Package: automake;

Reported by: carlyle_moulton <at> optusnet.com.au

Date: Fri, 9 May 2025 07:26:03 UTC

Severity: normal

Done: Karl Berry <karl <at> freefriends.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: <carlyle_moulton <at> optusnet.com.au>
To: 78329 <at> debbugs.gnu.org
Subject: bug#78329: bash extraction of segment from end of string returns full string
Date: Fri, 09 May 2025 06:36:27 +0000
[Message part 1 (text/plain, inline)]
GNU bash, version 5.2.32(1)-release (x86_64-redhat-linux-gnu)

Copyright (C) 2022 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later < http://gnu.org/licenses/gpl.html >

In Fedora 41.

${parameter:-offset} and ${parameter:-offset:length} return full parameter.

carl <at> fedora:~$ a=12345

carl <at> fedora:~$ echo ${a:-2}

12345

carl <at> fedora:~$ echo ${a:-3:2}

12345
[Message part 2 (text/html, inline)]

This bug report was last modified 5 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.