From owner-freebsd-questions@FreeBSD.ORG Sun Jan 18 14:58:49 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A7D3416A4CE for ; Sun, 18 Jan 2004 14:58:49 -0800 (PST) Received: from sage.thought.org (dsl231-043-140.sea1.dsl.speakeasy.net [216.231.43.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B3FE43D2D for ; Sun, 18 Jan 2004 14:58:40 -0800 (PST) (envelope-from kline@thought.org) Received: from thought.org (root@tao [10.0.0.247]) by sage.thought.org (8.12.9/8.11.4) with ESMTP id i0IMwfGH050839 for ; Sun, 18 Jan 2004 14:58:42 -0800 (PST) (envelope-from kline@thought.org) Received: (from kline@localhost) by thought.org (8.12.6/8.11.3) id i0IMwbof041576; Sun, 18 Jan 2004 14:58:37 -0800 (PST) (envelope-from kline) Date: Sun, 18 Jan 2004 14:58:37 -0800 From: Gary Kline To: Gary Kline , FreeBSD Mailing List Message-ID: <20040118225836.GC41181@tao.thought.org> References: <20040118030911.GA18161@tao.thought.org> <20040118034842.GA80517@madras.dyndns.org> <20040118050645.GB68597@tao.thought.org> <20040118155423.GM5411@npkfbsd> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040118155423.GM5411@npkfbsd> X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: Observing 17 years of service to the Unix community User-Agent: Mutt/1.5.5.1i Subject: Re: stumped... . X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2004 22:58:49 -0000 On Sun, Jan 18, 2004 at 09:54:23AM -0600, Nathan Kinkade wrote: > On Sat, Jan 17, 2004 at 09:06:45PM -0800, Gary Kline wrote: > > On Sun, Jan 18, 2004 at 02:48:42PM +1100, Gautam Gopalakrishnan wrote: > > > On Sat, Jan 17, 2004 at 07:09:12PM -0800, Gary Kline wrote: > > > > > > > > I've written scores of scripts to hack text files, but this > > > > one has me dead in the water. > > > > > > > > How can I delete all lines from /^PATTERN to EOF?? > > > > > > > > > > sed -e '/pattern/,$d' > > > > > > > Yep. Thisis what i used, in fact. thanks. > > > > gary > > Here is another option using sed that takes 2 less keystrokes :) > > $ sed -e '/pattern/q' > Impressive :-) gary -- Gary Kline kline@thought.org www.thought.org Public service Unix