From owner-freebsd-questions@FreeBSD.ORG Mon Sep 24 21:07:53 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 8F57816A4FC for ; Mon, 24 Sep 2007 21:07:53 +0000 (UTC) (envelope-from kline@tao.thought.org) Received: from tao.thought.org (dsl231-043-140.sea1.dsl.speakeasy.net [216.231.43.140]) by mx1.freebsd.org (Postfix) with ESMTP id 3C61813C48D for ; Mon, 24 Sep 2007 21:07:52 +0000 (UTC) (envelope-from kline@tao.thought.org) Received: from tao.thought.org (localhost [127.0.0.1]) by tao.thought.org (8.13.8/8.13.1) with ESMTP id l8OL7qTA047025 for ; Mon, 24 Sep 2007 14:07:53 -0700 (PDT) (envelope-from kline@tao.thought.org) Received: (from kline@localhost) by tao.thought.org (8.13.8/8.13.1/Submit) id l8OL7qD5047024 for freebsd-questions@FreeBSD.ORG; Mon, 24 Sep 2007 14:07:52 -0700 (PDT) (envelope-from kline) Date: Mon, 24 Sep 2007 14:07:51 -0700 From: Gary Kline To: FreeBSD Mailing List Message-ID: <20070924210751.GA46930@thought.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.2i X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: With 21 of service to the Unix community. Cc: Subject: sed question[s] 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: Mon, 24 Sep 2007 21:07:53 -0000 Hi, I could probably do at least part of this with an ed shell script, but sed is probaly more standard. (I may have asked this before, years back: FWIW. Anyhow, don't see it in my ~/Mail/freebsd files.) How can I automagically delete from $1,155d AND from the 25th line from the bottom to the last line with sed? I spent hours last night, by-hand saving web files; now I want to get rid of the cruft from them. Again, (I think) something like % sed -e 1,$155d < filefoo [[yes?]], but then the last part stumps me. tthanks, y'all, gary -- Gary Kline kline@thought.org www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org