From owner-freebsd-questions Wed Sep 2 23:16:37 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA24587 for freebsd-questions-outgoing; Wed, 2 Sep 1998 23:16:37 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from scientia.demon.co.uk (scientia.demon.co.uk [212.228.14.13]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA24570 for ; Wed, 2 Sep 1998 23:16:28 -0700 (PDT) (envelope-from ben@scientia.demon.co.uk) Received: from ben by scientia.demon.co.uk with local (Exim 2.02 #26) id 0zENz7-0003Mz-00; Thu, 3 Sep 1998 02:14:49 +0100 Date: Thu, 3 Sep 1998 02:14:49 +0100 From: Ben Smithurst To: Roman Katsnelson , "q's" Subject: Re: grep question Message-ID: <19980903021449.A12182@scientia.demon.co.uk> Mail-Followup-To: Roman Katsnelson , q's References: <35EDA68A.F931FA64@graphnet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <35EDA68A.F931FA64@graphnet.com> User-Agent: Mutt/0.94.3i (FreeBSD 3.0-CURRENT i386) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Roman Katsnelson wrote: > I have a flat data file with fields that are 16 lines long, of which the > third line is always unique. I need to be able to automate deleting > these records. Can't you just do { head -2 database.file tail -13 database.file } > database.tmp ? If you _always_ want to delete the third line, and they _always_ have 16 lines, that should work. Or have I misunderstood what you want to do? -- Ben Smithurst : ben@scientia.demon.co.uk : http://www.scientia.demon.co.uk/ PGP: 0x99392F7D - 3D 89 87 42 CE CA 93 4C 68 32 0E D5 36 05 3D 16 http://www.scientia.demon.co.uk/ben/pgp-key.html (or use keyservers) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message