Devuan bug report logs - #856
bash: Invalid processing of Parameter Expansion

version graph

Package: bash; Maintainer for bash is (unknown); Source for bash is src:bash.

Reported by: murzik <lorietta2023@gmail.com>

Date: Thu, 15 Aug 2024 06:32:01 UTC

Severity: normal

Tags: upstream

Merged with 855

Found in version 5.2.15-2+b7

Done: Mark Hindley <mark@hindley.org.uk>

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to devuan-bugs@lists.dyne.org, lorietta2023@gmail.com, devuan-dev@lists.dyne.org:
bug#856; Package bash. (Thu, 15 Aug 2024 06:32:01 GMT) (full text, mbox, link).


Acknowledgement sent to murzik <lorietta2023@gmail.com>:
New bug report received and forwarded. Copy sent to lorietta2023@gmail.com, devuan-dev@lists.dyne.org. (Thu, 15 Aug 2024 06:32:02 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.devuan.org (full text, mbox, reply):

From: murzik <lorietta2023@gmail.com>
To: submit@bugs.devuan.org
Subject: bash: Invalid processing of Parameter Expansion
Date: Thu, 15 Aug 2024 17:31:08 +1100
[Message part 1 (text/plain, inline)]
Package: bash
X-Debbugs-Cc: lorietta2023@gmail.com
Version: 5.2.15-2+b7
Severity: normal
Tags: upstream

Dear Maintainer,
When executing:
$ Var='Example1 $(Example2)'
$ echo "${Var#*'$('}"

I see an error:
bash: command substitution: line 6: unexpected EOF while looking for 
matching `''

instend of the expected result of cutting off part of the text.
dash and busybox ash work as excepted:
$ echo "${Var#*'$('}"
Example2)


-- System Information:
Distributor ID: Devuan
Description: Devuan GNU/Linux 5 (daedalus)
Release: 5
Codename: daedalus
Architecture: x86_64

Kernel: Linux 6.1.0-23-amd64 (SMP w/6 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: OpenRC (via /run/openrc), PID 1: openrc-init

Versions of packages bash depends on:
ii base-files 12.4devuan3
ii debianutils 5.7-0.5~deb12u1
ii libc6 2.36-9+deb12u7
ii libtinfo6 6.4-4

Versions of packages bash recommends:
ii bash-completion 1:2.11-6

Versions of packages bash suggests:
pn bash-doc <none>

-- Configuration Files:
/etc/bash.bashrc [Errno 1] Operation not permitted: '/etc/bash.bashrc'
/etc/skel/.bash_logout [Errno 1] Operation not permitted: 
'/etc/skel/.bash_logout'
/etc/skel/.bashrc [Errno 1] Operation not permitted: '/etc/skel/.bashrc'
/etc/skel/.profile [Errno 1] Operation not permitted: 
'/etc/skel/.profile'

-- no debconf information


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

Merged 855 856 Request was from Mark Hindley <mark@hindley.org.uk> to 855-submit@bugs.devuan.org. (Thu, 15 Aug 2024 06:44:02 GMT) (full text, mbox, link).


Message #8 received at 855-done@bugs.devuan.org (full text, mbox, reply):

From: Mark Hindley <mark@hindley.org.uk>
To: g4sra <g4sra@protonmail.com>
Cc: 855-done@bugs.devuan.org
Subject: Re: [devuan-dev] bug#855: bug#855: Invalid processing of Parameter Expansion
Date: Thu, 15 Aug 2024 14:19:54 +0100
On Thu, Aug 15, 2024 at 01:08:10PM +0000, g4sra wrote:
> Escaping $ rather than trying to quote works as expected
> 
> echo "${Var#*\$(}"
> 
> Is quoting a valid method in bash ?

A good point.

Closing as there may not even be a bug here. Even if there is, it is upstream.

Mark

Send a report that this bug log contains spam.


Devuan BTS -- Powered by Debian bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.

Devuan Bugs Owner <owner@bugs.devuan.org>.
Last modified: Thu Sep 19 17:04:32 2024;