From owner-freebsd-questions@FreeBSD.ORG Sun Jul 20 05:44:32 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 306481065672 for ; Sun, 20 Jul 2008 05:44:32 +0000 (UTC) (envelope-from walt@wump.org) Received: from que11.charter.net (que11.charter.net [209.225.8.21]) by mx1.freebsd.org (Postfix) with ESMTP id BF6F68FC16 for ; Sun, 20 Jul 2008 05:44:31 +0000 (UTC) (envelope-from walt@wump.org) Received: from aarprv04.charter.net ([10.20.200.74]) by mta31.charter.net (InterMail vM.7.08.03.00 201-2186-126-20070710) with ESMTP id <20080720052044.TKXJ15793.mta31.charter.net@aarprv04.charter.net>; Sun, 20 Jul 2008 01:20:44 -0400 Received: from [10.0.0.10] (really [68.116.98.9]) by aarprv04.charter.net with ESMTP id <20080720052044.CQCX7436.aarprv04.charter.net@[10.0.0.10]>; Sun, 20 Jul 2008 01:20:44 -0400 Mime-Version: 1.0 Message-Id: In-Reply-To: <20080720002345.GA9173@thought.org> References: <20080720002345.GA9173@thought.org> Date: Sat, 19 Jul 2008 22:23:09 -0700 To: Gary Kline , FreeBSD Mailing List From: Walt Pawley Content-Type: text/plain; charset="us-ascii" X-Chzlrs: 0 Cc: 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 05:44:32 -0000 At 5:23 PM -0700 7/19/08, Gary Kline wrote: >Guys, > >Is there an easyy way of splitting yp these tags into one-per-line? >I'm not obcessive [[?, :)]], but for what I've got in mind, the tags and stuff >would look better to my eyes? ....the outcome of this will go ino a special >database, not html . > >is there some clever perl one-liner that would help me turn > >
Realization
> >into > >
> > >Realization >
I've been using this ... #!/usr/bin/perl # Process HTML data on STDIN into one tag per line form on STDOUT while (<>) { s/\r/\n/gs; s//>\n/gs; s/\n\s*/\n/gs; s/^\s*//; print "$_" } ... for quite some time under the name "tag1". It's come in very handy. -- Walter M. Pawley Wump Research & Company 676 River Bend Road, Roseburg, OR 97470 541-672-8975