From owner-freebsd-questions@FreeBSD.ORG Mon Jul 5 01:22:00 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 093E216A4CE for ; Mon, 5 Jul 2004 01:22:00 +0000 (GMT) Received: from mail.cableone.net (scanmail1.cableone.net [24.116.0.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id B870B43D4C for ; Mon, 5 Jul 2004 01:21:59 +0000 (GMT) (envelope-from v.velox@vvelox.net) Received: from vixen42.24-119-122-191.cpe.cableone.net (unverified [24.119.122.191]) by smail1.cableone.net (SurgeMail 1.9b) with ESMTP id 7210160 for multiple; Sun, 04 Jul 2004 18:12:29 -0700 Date: Sun, 4 Jul 2004 20:22:02 -0500 From: Vulpes Velox To: Jon Drews Message-Id: <20040704202202.75528a32@vixen42.24-119-122-191.cpe.cableone.net> In-Reply-To: <8cb27cbf0407041551160a3b@mail.gmail.com> References: <20040704170807.2ea1ec75@vixen42.24-119-122-191.cpe.cableone.net> <8cb27cbf0407041551160a3b@mail.gmail.com> X-Mailer: Sylpheed-Claws 0.9.12 (GTK+ 1.2.10; i386-portbld-freebsd4.10) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Server: High Performance Mail Server - http://surgemail.com cc: freebsd-questions@freebsd.org Subject: Re: pattern replacement 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: Mon, 05 Jul 2004 01:22:00 -0000 On Sun, 4 Jul 2004 17:51:22 -0500 Jon Drews wrote: > Hi: > > Sed is useful for this. Here are some good tutorials on it: > > Common threads: Sed by example: > http://www-106.ibm.com/developerworks/linux/library/l-sed1.html > http://www-106.ibm.com/developerworks/linux/library/l-sed2.html > http://www-106.ibm.com/developerworks/linux/library/l-sed3.html Cool, thanks... I working on something with a fix using head, grep, and cut :) Basically grep -n for #include or whatehet, pipe it into head -n 1 it, and then head -n (pervious number cut and minus one> the file, then >> the include into it, and the this is where I am stuck... I can't find a way to cat everything after a certian line number out :/