Bug 96009 - sed prints incorrect reference number when the reference is invalid
Bug#: 96009 Product:  Gentoo Linux Version: 2005.0 Platform: All
OS/Version: All Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: base-system@gentoo.org Reported By: exg@gentoo.org
Component: Core system
URL: 
Summary: sed prints incorrect reference number when the reference is invalid
Keywords:  
Status Whiteboard: 
Opened: 2005-06-13 13:20 0000
Description:   Opened: 2005-06-13 13:20 0000
When using a \N reference with the 's' command and the reference is invalid sed
prints N + 1 as the invalid reference number.You can test it easily with the
following command:

echo 'something' | sed 's/\(.*\)/\2/'

The attached patch, from upstream, fixes the issue.

------- Comment #1 From Emanuele Giaquinta (RETIRED) 2005-06-13 13:21:31 0000 -------
Created an attachment (id=61164) [details]
sed.diff

------- Comment #2 From Chris White (RETIRED) 2005-06-13 13:38:48 0000 -------
Base system re-assignment.

------- Comment #3 From Chris White (RETIRED) 2005-06-13 13:38:58 0000 -------
Base system re-assignment.

------- Comment #4 From SpanKY 2005-06-13 16:16:37 0000 -------
thanks, added to 4.1.4