Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Nov 2000 16:38:42 +0000 (GMT)
From:      George Reid <greid@ukug.uk.freebsd.org>
To:        Matt Schlosser <mschlosser@eschelon.com>
Cc:        "'freebsd-questions@freebsd.org'" <freebsd-questions@freebsd.org>
Subject:   Re: file splitting
Message-ID:  <Pine.BSF.4.21.0011171635490.14947-100000@sobek.nevernet.net>
In-Reply-To: <C1781C38F13DA040848FEFAD07311B1036D6C6@walleye.corp.fishnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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
<num> <file> will split file into num lines, and split -b 20m <file> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0011171635490.14947-100000>