From owner-freebsd-questions@FreeBSD.ORG Tue Oct 23 02:38:02 2007 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 D4C8616A419 for ; Tue, 23 Oct 2007 02:38:02 +0000 (UTC) (envelope-from bma@gilmour.subvert.org.uk) Received: from jagger.subvert.org.uk (jagger.subvert.org.uk [80.68.88.238]) by mx1.freebsd.org (Postfix) with ESMTP id 7E05113C4B6 for ; Tue, 23 Oct 2007 02:38:02 +0000 (UTC) (envelope-from bma@gilmour.subvert.org.uk) Received: from localhost (jagger.subvert.org.uk [127.0.0.1]) by jagger.subvert.org.uk (Postfix) with ESMTP id 18B483831C for ; Tue, 23 Oct 2007 03:37:36 +0100 (BST) Received: from jagger.subvert.org.uk ([127.0.0.1]) by localhost (jagger.subvert.org.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2Pve2aYPgroi for ; Tue, 23 Oct 2007 03:37:25 +0100 (BST) Received: from gilmour.subvert.org.uk (user-514d9173.l3.c2.dsl.pol.co.uk [81.77.145.115]) (Authenticated sender: bma) by jagger.subvert.org.uk (Postfix) with ESMTP id CD0903830F for ; Tue, 23 Oct 2007 03:37:24 +0100 (BST) Received: by gilmour.subvert.org.uk (Postfix, from userid 1000) id C1F03B899; Tue, 23 Oct 2007 03:37:14 +0100 (BST) Date: Tue, 23 Oct 2007 03:37:13 +0100 From: "Benjamin M. A'Lee" To: freebsd-questions@freebsd.org Message-ID: <20071023023713.GC9711@gilmour.subvert.org.uk> References: <20071022224140.GA7786@thought.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="p2kqVDKq5asng8Dg" Content-Disposition: inline In-Reply-To: <20071022224140.GA7786@thought.org> User-Agent: Mutt/1.5.16 (2007-06-09) Subject: Re: help in deletion part of a line 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: Tue, 23 Oct 2007 02:38:02 -0000 --p2kqVDKq5asng8Dg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 22, 2007 at 03:41:40PM -0700, Gary Kline wrote: >=20 > Is there an easier way by sed or ed to remove strings=20 > (caight by grep) of the sort: >=20 > part5.chapter2.text- >=20 > where "5" and "2" can be any integer below 10? >=20 > (I know how to delete the *entire* line using ed, but not just > the first part? gilmour% echo testpart5.chapter2.text-test | sed 's/part[0-9].chapter[0-9]\= =2Etext-//g' =20 testtest Modify as necessary. --=20 Benjamin A'Lee http://subvert.org.uk/~bma/ "The right to search for truth implies also a duty; one must not conceal any part of what one has recognized to be true." - Albert Einstein --p2kqVDKq5asng8Dg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFHHV5YEUZDNrttL6ARAqbEAJ4uTjEaADOQxKHzc5UdBdO1yP7WWgCfWeJn 5N4R3um3DMVYj8mRlRFGUGU= =/BYv -----END PGP SIGNATURE----- --p2kqVDKq5asng8Dg--