A sed question

Unga unga888 at yahoo.com
Wed Jul 9 13:49:46 UTC 2008


--- On Wed, 7/9/08, Bertram Scharpf <lists at bertram-scharpf.de> wrote:

> From: Bertram Scharpf <lists at bertram-scharpf.de>
> Subject: Re: A sed question
> To: "Unga" <unga888 at yahoo.com>, freebsd-questions at 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 at .*@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 at .*@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


      


More information about the freebsd-questions mailing list