Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Jan 2004 19:09:12 -0800
From:      Gary Kline <kline@thought.org>
To:        FreeBSD Mailing List <freebsd-questions@FreeBSD.ORG>
Subject:   stumped... .
Message-ID:  <20040118030911.GA18161@tao.thought.org>

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

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

	ed - <<foo

	/^PATTERN
	(.,$)d
	w
	q
	foo

	or anything else I've tried doesn't do it.  I could do it in
	C/C++,but c'mon... !  Any solutions in sed, perl, or ed/ex?

	tia, everybody,

	gary

-- 
   Gary Kline     kline@thought.org   www.thought.org     Public service Unix



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