From owner-freebsd-questions Fri Nov 17 8:38:21 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mta05-svc.ntlworld.com (mta05-svc.ntlworld.com [62.253.162.45]) by hub.freebsd.org (Postfix) with ESMTP id 0C0E937B479 for ; Fri, 17 Nov 2000 08:38:19 -0800 (PST) Received: from m72-mp1-cvx1c.gui.ntl.com ([62.252.12.72]) by mta05-svc.ntlworld.com (InterMail vM.4.01.02.27 201-229-119-110) with ESMTP id <20001117163817.SDXT5562.mta05-svc.ntlworld.com@m72-mp1-cvx1c.gui.ntl.com>; Fri, 17 Nov 2000 16:38:17 +0000 Date: Fri, 17 Nov 2000 16:38:42 +0000 (GMT) From: George Reid X-Sender: geeorgy@sobek.nevernet.net To: Matt Schlosser Cc: "'freebsd-questions@freebsd.org'" Subject: Re: file splitting In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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? You could use split(1), but the two criteria are incompatible. split -l will split file into num lines, and split -b 20m will split the file into 20 megabyte sections. For greater power, use regular expressions (re_format(7)) in something like perl. However, I'm no perl guru. G "And then it comes to be that the soothing light at the end of your tunnel was just a freight train, comin' your way." George Reid * greid@ukug.uk.freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message