Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 363709 - Whitespace handling problems in parameter expansion replace operator
Summary: Whitespace handling problems in parameter expansion replace operator
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: libbash (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Petteri Räty (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-15 14:30 UTC by Petteri Räty (RETIRED)
Modified: 2018-01-25 17:54 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petteri Räty (RETIRED) gentoo-dev 2011-04-15 14:30:22 UTC
betelgeuse@pena ~/gsoc/libbash $ cat doc/replace.sh 
FOO='aa
bb'
echo ${FOO//
}
betelgeuse@pena ~/gsoc/libbash $ bash doc/replace.sh 
aabb
betelgeuse@pena ~/gsoc/libbash $ ./ast_printer -f doc/replace.sh 
-memory-(3)  : error 3 : ()* loopback of 110:18: ( redirect )*, at offset 5
    near [Index: 10 (Start: 157652917-Stop: 157652917) ='$', type<79> Line: 3 LinePos:5]
     : cannot match to any predicted input...
(LIST (= FOO (STRING (SINGLE_QUOTED_STRING aa 
 bb))) Tree Error Node)

It seems we must allow all kinds of white space probably for both pattern and replacement. For versionator I fixed having blanks in the pattern.
Comment 1 Pacho Ramos gentoo-dev 2018-01-25 17:54:52 UTC
Developer retired (and his mail address is not active anymore)