From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.2.1) Gecko/20030225 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): sed-4.0.5-1 How reproducible: Always 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' x [prompt]$ Expected Results: Substitution is not occured, and the patten space is not printed. [prompt]$ echo "x" | sed -n 's/x/SUBST/2p' [prompt]$ Additional info: This problem was fixed by 4.0.7 release. From Changelog of 4.0.9 release: 2003-03-23 Paolo Bonzini <bonzini> * 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
RH9 is obsolete now, and this bug is fixed on FC2.