Date: Mon, 19 Oct 2009 02:17:10 +0200 From: Polytropon <freebsd@edvax.de> To: Gary Kline <kline@thought.org> Cc: FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: using split, can i break up a huge txt file using a regex Message-ID: <20091019021710.6f25c602.freebsd@edvax.de> In-Reply-To: <20091017052510.GA1893@thought.org> References: <20091017052510.GA1893@thought.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 16 Oct 2009 22:25:13 -0700, Gary Kline <kline@thought.org> wrote: > I would like to put back the > huge text file into its 66 smaller files using split. Can I break this > very large journeyTowardtheDawn.txt using the regex > "Chapter [:digit:]{1,2}" ?? > > Or maybe just "Chapter " ? Maybe FreeBSD's csplit program is the right tool for this job. It supports splitting files based on context; you can use regex to express where a new file should be opened. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091019021710.6f25c602.freebsd>