Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Dec 2008 00:30:59 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        lconrad@Go2France.com
Cc:        freebsd-questions@freebsd.org
Subject:   Re: help with sed and tick marks
Message-ID:  <87eizqipgc.fsf@kobe.laptop>
In-Reply-To: <200812292231.AA754909386@mail.Go2France.com> (Len Conrad's message of "Mon, 29 Dec 2008 22:31:17 %2B0100")
References:  <200812292231.AA754909386@mail.Go2France.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 29 Dec 2008 22:31:17 +0100, "Len Conrad" <lconrad@Go2France.com> wrote:
> A string in a file contains
>
> ('name@domain.net'',
>
> ... where and we want to remove the extra tick mark, to have:
>
> ('name@domain.net',
>
> iow, replace
>
> net''
>
> with
>
> net'
>
> We've tried many combinations with sed, but failed.
>
> Suggestions?

Use proper quoting in your shell, i.e.:

    sed -e 's/'\'\''/'\''/g' < inputfile > outputfile

or different quote to delimit the sed expression:

    sed -e "s/''/'/g"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87eizqipgc.fsf>