From owner-freebsd-questions@FreeBSD.ORG Sun Jan 18 07:55:30 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 913D116A4CE for ; Sun, 18 Jan 2004 07:55:30 -0800 (PST) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2FF3843D31 for ; Sun, 18 Jan 2004 07:55:28 -0800 (PST) (envelope-from nkinkade@fastmail.fm) X-Sasl-enc: gCZWWfvYli86cYM9XjZjzQ 1074441284 Received: from [206.26.199.146] (unknown [206.27.244.214]) by www.fastmail.fm (Postfix) with ESMTP id EFE414AC854; Sun, 18 Jan 2004 10:54:43 -0500 (EST) Received: from nkinkade by [206.26.199.146] with local (Exim 4.12) id 1AiFFn-0000f6-00; Sun, 18 Jan 2004 09:54:23 -0600 Date: Sun, 18 Jan 2004 09:54:23 -0600 From: Nathan Kinkade To: Gary Kline Message-ID: <20040118155423.GM5411@npkfbsd> Mail-Followup-To: Gary Kline , FreeBSD Mailing List References: <20040118030911.GA18161@tao.thought.org> <20040118034842.GA80517@madras.dyndns.org> <20040118050645.GB68597@tao.thought.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hR5hZbB3sAoKVpMi" Content-Disposition: inline In-Reply-To: <20040118050645.GB68597@tao.thought.org> User-Agent: Mutt/1.4.1i Sender: Nathan Kinkade cc: FreeBSD Mailing List Subject: Re: stumped... . X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Nathan Kinkade List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2004 15:55:30 -0000 --hR5hZbB3sAoKVpMi Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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: > > >=20 > > > I've written scores of scripts to hack text files, but this > > > one has me dead in the water. > > >=20 > > > How can I delete all lines from /^PATTERN to EOF?? > > >=20 > >=20 > > sed -e '/pattern/,$d' > >=20 >=20 > Yep. Thisis what i used, in fact. thanks. >=20 > gary Here is another option using sed that takes 2 less keystrokes :) $ sed -e '/pattern/q' Nathan --=20 gpg --keyserver pgp.mit.edu --recv-keys D8527E49 --hR5hZbB3sAoKVpMi Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQFACqwvO0ZIEthSfkkRAl/gAJ0e7TLnrWMYcurld/7pAKXdy42r/gCeO6ug Pz+KIuCZ6UB3i/fEDuXTbYs= =NKts -----END PGP SIGNATURE----- --hR5hZbB3sAoKVpMi--