Bug 677389 - oddness in parameter expansion
Summary: oddness in parameter expansion
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: bash
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Roman Rakus
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-14 15:30 UTC by Miroslav Lichvar
Modified: 2014-01-13 00:13 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-07 17:28:31 UTC
Type: ---


Attachments (Terms of Use)

Description Miroslav Lichvar 2011-02-14 15:30:36 UTC
Description of problem:
xterm configure script fails in rawhide with an odd error:
line 5780: bad substitution: no closing `}' in ${icondir:-'\$(exec_prefix)/share/pixmaps'}

It seems that when bash is started as /bin/sh, the following expression doesn't work:

$ echo "${a:-'a/b'}"
sh: bad substitution: no closing `}' in ${a:-'a/b'}

Interesting is that removing the slash or the quotes or the double quotes from the expression makes it work.

Version-Release number of selected component (if applicable):
bash-4.2.0-0.1.rc2.fc15.x86_64

How reproducible:
Always

Steps to Reproduce:
1. echo "${a:-'a/b'}"

Actual results:
sh: bad substitution: no closing `}' in ${a:-'a/b'}

Expected results:
a/b

Comment 1 Roman Rakus 2011-02-14 19:27:30 UTC
Thanks for the report. It is known and probably will be fixed in next release.
See http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00125.html, what is the issue reported upstream.

Comment 2 Roman Rakus 2011-03-07 16:44:49 UTC
Can you please try the latest built? Seems it is fixed.

Comment 3 Miroslav Lichvar 2011-03-07 17:28:31 UTC
Works with bash-4.2.7-1.fc16, thanks!


Note You need to log in before you can comment on or make changes to this bug.