From owner-freebsd-questions Fri Nov 17 12:40:58 2000 Delivered-To: freebsd-questions@freebsd.org Received: from shf102107.hi.pac.army.mil (shf102107.hi.pac.army.mil [141.190.102.107]) by hub.freebsd.org (Postfix) with ESMTP id A2BEF37B479 for ; Fri, 17 Nov 2000 12:40:56 -0800 (PST) Received: from localhost (localhost [[UNIX: localhost]]) by shf102107.hi.pac.army.mil (8.10.1/8.10.1) id eAHKfsK03637; Fri, 17 Nov 2000 10:41:54 -1000 From: Gary Dunn Reply-To: gdunn@mac.com Organization: Open Slate Project To: Matt Schlosser , "'freebsd-questions@freebsd.org'" Subject: Re: file splitting Date: Fri, 17 Nov 2000 10:23:44 -1000 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain References: In-Reply-To: MIME-Version: 1.0 Message-Id: <00111710415402.03598@shf102107.hi.pac.army.mil> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 17 Nov 2000, Matt Schlosser wrote: > What would be the fastest method of splitting a text file (200MB) into 20MB > sections while keeping line length intact? > An approximate solution: wc myfile output: lines, words, chars 200/20 = 10, so compute linesPerPiece as lines/10 split -l linesPerPiece myfile -- == Gary Dunn == Honolulu == Open Slate Project To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message