From owner-freebsd-questions@FreeBSD.ORG Mon Oct 19 00:17:15 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E45E1065670 for ; Mon, 19 Oct 2009 00:17:15 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id C16B88FC14 for ; Mon, 19 Oct 2009 00:17:14 +0000 (UTC) Received: from r55.edvax.de (port-92-195-71-245.dynamic.qsc.de [92.195.71.245]) by mx01.qsc.de (Postfix) with ESMTP id 159F43C5B5; Mon, 19 Oct 2009 02:17:12 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id n9J0HAP8001609; Mon, 19 Oct 2009 02:17:11 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Mon, 19 Oct 2009 02:17:10 +0200 From: Polytropon To: Gary Kline Message-Id: <20091019021710.6f25c602.freebsd@edvax.de> In-Reply-To: <20091017052510.GA1893@thought.org> References: <20091017052510.GA1893@thought.org> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: FreeBSD Mailing List Subject: Re: using split, can i break up a huge txt file using a regex X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Oct 2009 00:17:15 -0000 On Fri, 16 Oct 2009 22:25:13 -0700, Gary Kline 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, ...