From owner-freebsd-questions@FreeBSD.ORG Sun Jul 20 06:39:17 2008 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 BE5D7106564A for ; Sun, 20 Jul 2008 06:39:17 +0000 (UTC) (envelope-from kline@thought.org) Received: from aristotle.thought.org (aristotle.thought.org [209.180.213.210]) by mx1.freebsd.org (Postfix) with ESMTP id 76AF68FC08 for ; Sun, 20 Jul 2008 06:39:17 +0000 (UTC) (envelope-from kline@thought.org) Received: from thought.org (tao.thought.org [10.47.0.250]) (authenticated bits=0) by aristotle.thought.org (8.14.2/8.14.2) with ESMTP id m6K6btdK025892; Sat, 19 Jul 2008 23:38:10 -0700 (PDT) (envelope-from kline@thought.org) Received: by thought.org (nbSMTP-1.00) for uid 1002 kline@thought.org; Sat, 19 Jul 2008 23:38:01 -0700 (PDT) Date: Sat, 19 Jul 2008 23:37:46 -0700 From: Gary Kline To: Giorgos Keramidas Message-ID: <20080720063746.GB21826@thought.org> References: <20080720002345.GA9173@thought.org> <878wvxfkq0.fsf@kobe.laptop> <87mykde2ho.fsf@kobe.laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87mykde2ho.fsf@kobe.laptop> User-Agent: Mutt/1.4.2.3i X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: With 21++ years of service to the Unix community. X-Spam-Status: No, score=-4.4 required=3.6 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on aristotle.thought.org Cc: FreeBSD Mailing List Subject: Re: How to divide up? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jul 2008 06:39:17 -0000 On Sun, Jul 20, 2008 at 05:03:15AM +0300, Giorgos Keramidas wrote: > On Sun, 20 Jul 2008 03:44:07 +0300, Giorgos Keramidas wrote: > > Now, if you want to merely "hack something quick and dirty", a short > > Perl script can probably do regexp substitution similar to > > > > # > > # WARNING: THIS HAS NOT BEEN TESTED :P > > # > > my $foo = ; > > $foo = s:(<[^>]+>[^<]*]+>):$1\n:ge; > > print "$foo"; > > > > but you shouldn't trust the output of such a quick hack too much. > > As I wrote in reply to the personal email, this was untested and a bit > wrong in places, but now I've tried something like: > > $ echo 'worldnext world' | \ > perl -e '$foo = ; $foo =~ s:(<[^>]+>[^<]*]+>):$1\n:g; print "$foo";' > > and it does seem to sort of work. The output is: > > world > next world > > Maybe that's good enough? They say `the perfect is the enemy of good > enough', so if this works for your data set, it's probably ok to use it :-) > > Have fun, > Giorgos > Fun?! welll, but yes, anything that can save me from hand-editing ~~70 files will be a riot;) gary -- Gary Kline kline@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org