From owner-freebsd-questions@FreeBSD.ORG Tue Oct 23 03:13:18 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 222D616A420 for ; Tue, 23 Oct 2007 03:13:18 +0000 (UTC) (envelope-from shantanoo@gmail.com) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.191]) by mx1.freebsd.org (Postfix) with ESMTP id D135C13C4B7 for ; Tue, 23 Oct 2007 03:13:17 +0000 (UTC) (envelope-from shantanoo@gmail.com) Received: by rv-out-0910.google.com with SMTP id l15so1209696rvb for ; Mon, 22 Oct 2007 20:13:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; bh=99DyAhqmTWUsYyIZOxisf1vYku7nQK006fFA9rnvniQ=; b=LUD/Minf9GTbTaUgztPFq6sgn9fmsutJ6hG1B/8XSqKvB3fXOrocyfqc5fWHBx2AyPirgbvlbXI5aBMlO3CULXYhJe4mx5Sd7FU8SMpGuA2OOTkzvqxpuo08WpL6AosZ/ROUQ7i0e/2O4TD2+PPIhEAFSuiClSO1fgq6OskTuMo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=qplDIuCeQltqpp2O5GUyOFV4e2owuj6EfcZu27MGFYd0zvODberRHWPUFQlhFg5czqIB/fIq8zNCX7O4VM5tatC/otuTNAtV9J1a+o1tuMie0OgkuaVc7FoSxWv3bzr3IEVLIpeQWll5gd5UCLypaqtD9655e8I8KTGh4NTKNV4= Received: by 10.141.14.14 with SMTP id r14mr2745578rvi.1193107440751; Mon, 22 Oct 2007 19:44:00 -0700 (PDT) Received: from ?192.168.0.100? ( [121.247.78.27]) by mx.google.com with ESMTPS id k14sm10650499rvb.2007.10.22.19.43.56 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 22 Oct 2007 19:43:59 -0700 (PDT) In-Reply-To: <20071022224140.GA7786@thought.org> References: <20071022224140.GA7786@thought.org> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Shantanoo Mahajan Date: Tue, 23 Oct 2007 08:13:49 +0530 To: Gary Kline X-Mailer: Apple Mail (2.752.3) Cc: FreeBSD Mailing List 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 03:13:18 -0000 On 23-Oct-07, at 4:11 AM, Gary Kline wrote: > > Is there an easier way by sed or ed to remove strings > (caight by grep) of the sort: > > part5.chapter2.text- > > where "5" and "2" can be any integer below 10? > > (I know how to delete the *entire* line using ed, but not just > the first part? $ echo 'part5.chapter2.text-' | tr -d '[0-9]' part.chapter.text- $ echo 'part5.chapter2.text-' | sed 's/[0-9]//g' part.chapter.text- regards, shantanoo