From owner-freebsd-questions@FreeBSD.ORG Wed Jul 9 13:49:45 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1F03106564A for ; Wed, 9 Jul 2008 13:49:45 +0000 (UTC) (envelope-from unga888@yahoo.com) Received: from web57013.mail.re3.yahoo.com (web57013.mail.re3.yahoo.com [66.196.97.117]) by mx1.freebsd.org (Postfix) with SMTP id 880818FC19 for ; Wed, 9 Jul 2008 13:49:45 +0000 (UTC) (envelope-from unga888@yahoo.com) Received: (qmail 44171 invoked by uid 60001); 9 Jul 2008 13:49:44 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Message-ID; b=xcSnxGhpmapWMfnzyqwxALSZ16LuBU3sbLyKk/xWJAp34v4umm5ON5iV295m8Gwg4U1QSwoIOmrG8WHjEhpyyLPmTHjDQuLkh5eKiwFVb3fI6DEygxt2oFKpn9aHFBYJh3H6ECcFYVrCg/1one2YVwNSGmJ0tGhD4fyU4y2//sg=; Received: from [220.255.7.221] by web57013.mail.re3.yahoo.com via HTTP; Wed, 09 Jul 2008 06:49:43 PDT X-Mailer: YahooMailWebService/0.7.199 Date: Wed, 9 Jul 2008 06:49:43 -0700 (PDT) From: Unga To: Bertram Scharpf In-Reply-To: <20080709105237.GA32361@marge.bs.l> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <472423.43997.qm@web57013.mail.re3.yahoo.com> Cc: freebsd-questions@freebsd.org Subject: Re: A sed question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: unga888@yahoo.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jul 2008 13:49:46 -0000 --- On Wed, 7/9/08, Bertram Scharpf wrote: > From: Bertram Scharpf > Subject: Re: A sed question > To: "Unga" , freebsd-questions@freebsd.org > Date: Wednesday, July 9, 2008, 6:52 PM > Hii, > > Am Mittwoch, 09. Jul 2008, 00:35:32 -0700 schrieb Unga: > > I want to translate following GNU sed lines to FreeBSD > sed: > > > > 1. sed -e '/\*address:/{n;s@.*@replaceText > @}' > > 2. sed -e '/\*address:/{n;s@$@ > replaceText@}' > > An obvious problem is that a semicolon is missing before > the closing > brace. > > sed -e '/\*address:/{n;s@.*@replaceText > @;}' > > I'm almost sure your version won't work with GNU > sed either. > Thank you very much for the reply. That was indeed the difference between the GNU sed and the FreeBSD sed in this case. I tested with a semicolon, it worked perfectly but the GNU sed does not require similar semicolon. Best regards Unga