From owner-freebsd-questions Fri Dec 11 00:58:27 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA07807 for freebsd-questions-outgoing; Fri, 11 Dec 1998 00:58:27 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from ctech.ac.za (ctech.ac.za [155.238.4.20]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA07731 for ; Fri, 11 Dec 1998 00:57:34 -0800 (PST) (envelope-from jacques@ctech.ac.za) Received: from wired.ctech.ac.za (wired.ctech.ac.za [155.238.4.21]) by ctech.ac.za (8.9.1+3.0W/8.9.1) with ESMTP id KAA23598; Fri, 11 Dec 1998 10:54:06 -0200 (GMT) Received: from wired.ctech.ac.za (localhost [127.0.0.1]) by wired.ctech.ac.za (8.9.1a/8.9.1) with SMTP id LAA25739; Fri, 11 Dec 1998 11:00:32 +0200 (SAST) Message-ID: <3670DF30.41C67EA6@ctech.ac.za> Date: Fri, 11 Dec 1998 11:00:32 +0200 From: Jacques Hugo X-Mailer: Mozilla 3.04 (X11; I; FreeBSD 2.2.7-RELEASE i386) MIME-Version: 1.0 To: Sue Blake CC: questions@FreeBSD.ORG Subject: Re: carving up a file References: <19981211195018.15365@welearn.com.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Sue Blake wrote: > > I've got a 2 meg text (RTF) file to split into a dozen files, one for > each chapter, after each time it is edited. > > There is a distinctive string at the beginning of each chapter, > another could be added to the file, or I could go by line numbers. > > Is there already an easy way to do this, or do I roll my own? Roll my own ?? ;) cute. Have a look at split(1) -b gives you byte-count and -l by lines. Cheers -Jacques ------------------------------------------------------ The box said "Requires Windows 3.1 or better" ... so I got BSD Network Administrator | Jacques Hugo UNIX Systems | jacques@ctech.ac.za Cape Technikon | +27-21-4603584 ------------------------------------------------------ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message