From sean@farley.org  Sat Dec  4 16:22:55 2004
Return-Path: <sean@farley.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id D6B1516A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  4 Dec 2004 16:22:55 +0000 (GMT)
Received: from mail.farley.org (farley.org [67.64.95.201])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 3F80843D68
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  4 Dec 2004 16:22:55 +0000 (GMT)
	(envelope-from sean@farley.org)
Received: from thor.farley.org (thor.farley.org [IPv6:2001:470:1f01:290:1::5])
	by mail.farley.org (8.13.1/8.13.1) with ESMTP id iB4GMrUY099843
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 4 Dec 2004 10:22:53 -0600 (CST)
	(envelope-from sean@gw.farley.org)
Received: from thor.farley.org (localhost [127.0.0.1])
	by thor.farley.org (8.13.1/8.13.1) with ESMTP id iB4GN0C4030156
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 4 Dec 2004 10:23:00 -0600 (CST)
	(envelope-from sean@thor.farley.org)
Received: (from sean@localhost)
	by thor.farley.org (8.13.1/8.13.1/Submit) id iB4GN0Ds030155;
	Sat, 4 Dec 2004 10:23:00 -0600 (CST)
	(envelope-from sean)
Message-Id: <200412041623.iB4GN0Ds030155@thor.farley.org>
Date: Sat, 4 Dec 2004 10:23:00 -0600 (CST)
From: Sean Farley <sean-freebsd@farley.org>
Reply-To: Sean Farley <sean-freebsd@farley.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: sed does not handle ? and + correctly
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         74672
>Category:       bin
>Synopsis:       sed does not handle ? and + correctly
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 04 16:30:27 GMT 2004
>Closed-Date:    Sat Dec 04 16:55:04 GMT 2004
>Last-Modified:  Sat Dec 04 16:55:04 GMT 2004
>Originator:     Sean Farley
>Release:        FreeBSD 5.3-STABLE i386
>Organization:
>Environment:
System: FreeBSD thor.farley.org 5.3-STABLE FreeBSD 5.3-STABLE #0: Mon Nov 29 13:48:28 CST 2004 root@thor.farley.org:/usr/obj/usr/src/sys/THOR i386

>Description:
The system sed does not handle ? and + correctly.

This works with GNU sed (gsed from ports) by replacing the first "localhost" in
a line but the system sed makes no changes:

sed -e 's/localhost\?/ASDF/' /etc/hosts|egrep -i 'localhost|ASDF'
sed -e 's/localhost\+/ASDF/' /etc/hosts|egrep -i 'localhost|ASDF'

>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:

From: Sean Farley <sean-freebsd@farley.org>
To: freebsd-gnats-submit@FreeBSD.org, sean-freebsd@farley.org
Cc:  
Subject: Re: bin/74672: sed does not handle ? and + correctly
Date: Sat, 4 Dec 2004 10:46:14 -0600 (CST)

 Silly me.  I forgot about -E which does work.  This may be closed.
 
 BTW, is there any particular reason for not having -E the default?
 
 Sean
 -- 
 sean-freebsd@farley.org
State-Changed-From-To: open->closed 
State-Changed-By: simon 
State-Changed-When: Sat Dec 4 16:54:57 GMT 2004 
State-Changed-Why:  
Close at submitters request. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=74672 
>Unformatted:
