From owner-freebsd-stable@FreeBSD.ORG Wed Jan 12 22:51:23 2011 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB2BE1065694 for ; Wed, 12 Jan 2011 22:51:23 +0000 (UTC) (envelope-from bob@immure.com) Received: from maul.immure.com (adsl-66-136-206-1.dsl.austtx.swbell.net [66.136.206.1]) by mx1.freebsd.org (Postfix) with ESMTP id 9C41F8FC0A for ; Wed, 12 Jan 2011 22:51:23 +0000 (UTC) Received: from rancor.immure.com (rancor.immure.com [10.1.132.9]) by maul.immure.com (8.14.4/8.14.4) with ESMTP id p0CMWTP7004693; Wed, 12 Jan 2011 16:32:29 -0600 (CST) (envelope-from bob@immure.com) Received: (from bob@localhost) by rancor.immure.com (8.14.4/8.14.4/Submit) id p0CMWTR1067698; Wed, 12 Jan 2011 16:32:29 -0600 (CST) (envelope-from bob) Date: Wed, 12 Jan 2011 16:32:29 -0600 From: Bob Willcox To: Clifton Royston Message-ID: <20110112223229.GB65854@rancor.immure.com> References: <20110112070009.GB20924@lava.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110112070009.GB20924@lava.net> User-Agent: Mutt/1.5.20 (2009-06-14) X-immure-MailScanner-Information: Please contact the ISP for more information X-immure-MailScanner-ID: p0CMWTP7004693 X-immure-MailScanner: Found to be clean X-immure-MailScanner-From: bob@immure.com X-Spam-Status: No Cc: stable@freebsd.org, Oliver Pinter Subject: Re: sed is broken under freebsd? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Bob Willcox List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jan 2011 22:51:23 -0000 On Tue, Jan 11, 2011 at 09:00:09PM -1000, Clifton Royston wrote: > On Wed, Jan 12, 2011 at 02:32:52AM +0100, Oliver Pinter wrote: > > hi all! > > > > The freebsd versions of sed contained a bug/regression, when \n char > > can i subsitue, gsed not affected with this bug: > > > FreeBSD xxx 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 > > UTC 2010 root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC > > i386 > > aa@xxx ~> echo axa | sed s/x/\n/g > > ana > > aa@xxx ~> echo axa | sed s/x/'\n'/g > > ana > > Different than GNU is not a bug. > > I have 7.3 here. It behaves as the above, which is how the man page says it > should work. The following is how the man page specifies you can substitute > a newline, by prefacing a quoted actual newline with a backslash: > > $ echo axa | sed 's/x/\ > > /g' > a > a > > That's how I remember classic sed behaving (Unix v7 or thereabouts.) > -- Clifton FWI, AIX 6.1 sed works as the FreeBSD sed does. -- Bob Willcox When the ax entered the forest, the trees said, bob@immure.com "The handle is one of us!" Austin, TX -- Turkish proverb