From owner-freebsd-questions@FreeBSD.ORG Mon Dec 29 22:31:10 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 6227B1065696 for ; Mon, 29 Dec 2008 22:31:10 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id B44DD8FC1B for ; Mon, 29 Dec 2008 22:31:09 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (adsl119-205.kln.forthnet.gr [77.49.238.205]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-5) with ESMTP id mBTMUx3g015269 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 30 Dec 2008 00:31:05 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id mBTMUxxA022165; Tue, 30 Dec 2008 00:30:59 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id mBTMUx2w022159; Tue, 30 Dec 2008 00:30:59 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: lconrad@Go2France.com References: <200812292231.AA754909386@mail.Go2France.com> Date: Tue, 30 Dec 2008 00:30:59 +0200 In-Reply-To: <200812292231.AA754909386@mail.Go2France.com> (Len Conrad's message of "Mon, 29 Dec 2008 22:31:17 +0100") Message-ID: <87eizqipgc.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: mBTMUx3g015269 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.869, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.53, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-questions@freebsd.org Subject: Re: help with sed and tick marks X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2008 22:31:10 -0000 On Mon, 29 Dec 2008 22:31:17 +0100, "Len Conrad" 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"