Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Jan 2004 09:54:23 -0600
From:      Nathan Kinkade <nkinkade@ub.edu.bz>
To:        Gary Kline <kline@thought.org>
Cc:        FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: stumped... .
Message-ID:  <20040118155423.GM5411@npkfbsd>
In-Reply-To: <20040118050645.GB68597@tao.thought.org>
References:  <20040118030911.GA18161@tao.thought.org> <20040118034842.GA80517@madras.dyndns.org> <20040118050645.GB68597@tao.thought.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040118155423.GM5411>