MESSAGE
DATE | 2011-12-15 |
FROM | Kevin Mark
|
SUBJECT | Re: [NYLXS - HANGOUT] A simple perl script
|
From owner-hangout-outgoing-at-mrbrklyn.com Thu Dec 15 04:32:42 2011 Return-Path: X-Original-To: archive-at-mrbrklyn.com Delivered-To: archive-at-mrbrklyn.com Received: by www2.mrbrklyn.com (Postfix) id 3F26A100B4B; Thu, 15 Dec 2011 04:32:42 -0500 (EST) Delivered-To: hangout-outgoing-at-www2.mrbrklyn.com Received: by www2.mrbrklyn.com (Postfix, from userid 28) id 280BA100B72; Thu, 15 Dec 2011 04:32:42 -0500 (EST) Delivered-To: hangout-at-mrbrklyn.com Received: from nm26-vm0.access.bullet.mail.mud.yahoo.com (nm26-vm0.access.bullet.mail.mud.yahoo.com [66.94.236.225]) by www2.mrbrklyn.com (Postfix) with SMTP id 06617100B4B for ; Thu, 15 Dec 2011 04:32:40 -0500 (EST) Received: from [66.94.237.127] by nm26.access.bullet.mail.mud.yahoo.com with NNFMP; 15 Dec 2011 09:34:20 -0000 Received: from [66.94.237.107] by tm2.access.bullet.mail.mud.yahoo.com with NNFMP; 15 Dec 2011 09:34:20 -0000 Received: from [127.0.0.1] by omp1012.access.mail.mud.yahoo.com with NNFMP; 15 Dec 2011 09:34:20 -0000 X-Yahoo-Newman-Id: 63478.89725.bm-at-omp1012.access.mail.mud.yahoo.com Received: (qmail 43512 invoked from network); 15 Dec 2011 09:34:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1323941659; bh=pX+X7wOVdA2vqAsN0KVnhrw4MNWC5Icad10XjVaUhNU=; h=X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Received:Date:From:To:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent; b=HGGH7+alSQ1dBrBQrI2HV2mc5P6bVmldAGE1HVfkS42YoCQD0cHiYULM82JLHnkQyQd5cCTTyoVQoXDAfQEnQr+Hn58QXu3cfsIbbvnrKinbXx9u8BwAsnj6dGzHo1kHLwzSVztRUbEVxghvP/0bj/se+sKt5dt2YWtSKYE51Ms= X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: nLn4L.AVM1nUchLSDnxDNx5YByGoS0xQMuNfb1l1.LGeS8O HbVDLQCfu9agBwA.yCBkOX5LE3QtsxymEdWp6LmubjglwzhopiF7PCIfsSC6 .u1x4umj3vycmIWuUKWq4yh9e9nWxJ3nFrwxy81kkgoHJUX_JPmyulUBxBde xEvRq4AaQnEWh4vyE9TXM4lm5zvgYm50k4A98zq5gHAYxfvZkv9iSp.xZs8k TBB3L0eCiDZMnL3iZoBYa4ezIiXXR9Wjpe5Laa7dq9Lf5npwOAiaz59hHYzP N0H8.a9U8IAXLARm7l10KjwgOPHNSuP64COc6RYHTETq3vuvDcRi1ro2M.LQ _mdMZ.1A3xXQZYgrUNz_6lwCGCwh8BI4E.uGJrQaj9kNE28gVeGnm1LUx28x dFIjYkI9sCKcT30O..h4mMDgHehHg0weAhZ4OGP74EuM45WuBHqqnSmZP3RU V15pjtGtRM3aNOQi0zZFXFPKWUzZO6kIep.GbUMj.hljLTpSw4_9cQRCrxeo T5078tHZyiXOLMOVv5cG1j84AcozPrzeOHRaXQwLIn8VnCymslKztzFcLyg. Nez8MEJd_VhS6onq2ApBPBoiJeKILRC11AjNAP6rAcIb5wtMvRR048VdrfFq Mgzky9b4dSQ-- X-Yahoo-SMTP: wG4CCPiswBChUVH.gLeBrKCJfEIMur92PpCMHzFn6Ucja3g- Received: from horacrux (kevin.mark-at-98.113.63.95 with plain) by smtp101.vzn.mail.bf1.yahoo.com with SMTP; 15 Dec 2011 01:34:19 -0800 PST Received: from kevin by horacrux with local (Exim 4.74) (envelope-from ) id 1Rb7hj-0007PU-5q for hangout-at-mrbrklyn.com; Thu, 15 Dec 2011 04:34:19 -0500 Date: Thu, 15 Dec 2011 04:34:19 -0500 From: Kevin Mark To: hangout-at-mrbrklyn.com Subject: Re: [NYLXS - HANGOUT] A simple perl script Message-ID: <20111215093419.GA28275-at-horacrux> References: <20111214070833.GA11058-at-panix.com> <1323908859.93530.YahooMailNeo-at-web38006.mail.mud.yahoo.com> <20111215045925.GA2102-at-horacrux> <1323928459.1868.YahooMailNeo-at-web38005.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1323928459.1868.YahooMailNeo-at-web38005.mail.mud.yahoo.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: owner-hangout-at-mrbrklyn.com Precedence: bulk Reply-To: hangout-at-mrbrklyn.com
On Wed, Dec 14, 2011 at 09:54:19PM -0800, Elfen Magix wrote: > I was thinking of Grep as well. > > The problem is simple (maybe not): > -Its a story text file in acsii. > -It has many chapters > -The chapter index numbers 1 - 13 are fine, skips 14, and continues with 15 to > 75. > -The format of the chapter line (all 75 are in 1 file) is: > "Chapter XX: Chapter Name" Where XX is any number from 0 - 9, counting all 75 > chapters. > > I was thinking of grep to find the chapter lines (which I can do and does work) > but changing the numbers is what I cant figure out. > > grep 'Chapter' /file name - gets the chapter lines and posts them. But > changing them? > > BTW- I can remove chapters 1 - 13 temporarily while this change happens. here is what I'd do: I try to find all of the count lines and see which chapter numbers where missing and then try to renumber the chapters accordinly like this: chapter 1 -> chapter 1 chapter 2 -> chapter 2 chapter 4 -> chapter 3 chapter 6 -> chapter 4
-- | .''`. == Debian GNU/Linux ==.| http://kevix.myopenid.com......| | : :' : The Universal OS....| mysite.verizon.net/kevin.mark/.| | `. `' http://www.debian.org/.| http://counter.li.org [#238656]| |___`-____Unless I ask to be CCd,.assume I am subscribed._________|
Blackout, heatwave, .44 caliber homicide, The bums drop dead and the dogs go mad in packs on the West Side, A young girl standing on a ledge, looks like another suicide, She wants to hit those bricks, 'cause the news at six got to stick to a deadline, While the millionaires hide in Beekman place, The bag ladies throw their bones in my face, I get attacked by a kid with stereo sound, I don't want to hear it but he won't turn it down... -- Billy Joel, "Glass Houses"
|
|