Bug 113939 - numbered match bug
numbered match bug
Product: Red Hat Linux
Classification: Retired
Component: sed (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2004-01-20 09:44 EST by SEKINE Tatsuo
Modified: 2007-04-18 13:01 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-06-10 09:57:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description SEKINE Tatsuo 2004-01-20 09:44:09 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.2.1)

Description of problem:
GNU sed ver. 4.x-4.0.6 have bugs of numbered match substitution.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.     echo "x" | sed -n 's/x/SUBST/2p'

Actual Results:  Substitution is not occured.
But the pattern space is "p"rinted as follows:

[prompt]$ echo "x" | sed -n 's/x/SUBST/2p'

Expected Results:  Substitution is not occured, and the patten space
is not printed.

[prompt]$ echo "x" | sed -n 's/x/SUBST/2p'

Additional info:

This problem was fixed by 4.0.7 release.
From Changelog of 4.0.9 release:

2003-03-23  Paolo Bonzini  <bonzini@gnu.org>

        * sed/execute.c (do_subst): fix several bugs with
        numbered matches
        * testsuite/numsub2.good, testsuite/numsub2.inp,
        testsuite/numsub2.sed, testsuite/numsub3.good,
        testsuite/numsub3.inp, testsuite/numsub3.sed,
        testsuite/numsub4.good, testsuite/numsub4.inp,
        testsuite/numsub4.sed, testsuite/numsub5.good,
        testsuite/numsub5.inp, testsuite/numsub5.sed:
        regression tests for the bugs
Comment 1 SEKINE Tatsuo 2004-06-10 09:57:10 EDT
RH9 is obsolete now, and this bug is fixed on FC2.

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