MESSAGE
DATE | 2011-12-15 |
FROM | Elfen Magix
|
SUBJECT | Re: [NYLXS - HANGOUT] A simple perl script
|
From owner-hangout-outgoing-at-mrbrklyn.com Thu Dec 15 00:52:42 2011 Return-Path: X-Original-To: archive-at-mrbrklyn.com Delivered-To: archive-at-mrbrklyn.com Received: by www2.mrbrklyn.com (Postfix) id CBD1C100B42; Thu, 15 Dec 2011 00:52:41 -0500 (EST) Delivered-To: hangout-outgoing-at-www2.mrbrklyn.com Received: by www2.mrbrklyn.com (Postfix, from userid 28) id B6B94100B50; Thu, 15 Dec 2011 00:52:41 -0500 (EST) Delivered-To: hangout-at-mrbrklyn.com Received: from nm40-vm5.bullet.mail.bf1.yahoo.com (nm40-vm5.bullet.mail.bf1.yahoo.com [72.30.239.213]) by www2.mrbrklyn.com (Postfix) with SMTP id DA15A100B42 for ; Thu, 15 Dec 2011 00:52:40 -0500 (EST) Received: from [98.139.212.151] by nm40.bullet.mail.bf1.yahoo.com with NNFMP; 15 Dec 2011 05:54:20 -0000 Received: from [98.139.212.207] by tm8.bullet.mail.bf1.yahoo.com with NNFMP; 15 Dec 2011 05:54:20 -0000 Received: from [127.0.0.1] by omp1016.mail.bf1.yahoo.com with NNFMP; 15 Dec 2011 05:54:20 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 454870.75836.bm-at-omp1016.mail.bf1.yahoo.com Received: (qmail 4419 invoked by uid 60001); 15 Dec 2011 05:54:20 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1323928459; bh=rP0bVEGugdZD7A9Tcenb3UDWzRB+uTcH+TtjmiGpGHM=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=2DXcWtVIT+nTps7aGRnj+NSFUNIgPrgWKfCcYXC6J6mCp/GIVD1eOksQ9wbW1vuimCRcekvThi+Xh2KMnqHS/3+bO3fDQvTFmHbjNbnidPztZkqNbE7ZFlzx+IIsflnFlmHiz5eLI7rz8dqVQLtEyFf/LXN1ew+hoYwapY+5EI4= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=t1qotA+4/owNkVNYA3nza/4W94GbXe3Uf4rNNPiVKh80kitY1cBB77mDXOzrj0+lkftO1ssEJbGsuVfVMfmDd3NtACvw37XkUlecohtAKHBrl5WOMcPZZIQqTj5BT7cQdsl4DU4EvpKntBRmBmhechu4Kgzc1z83SBG0LmgC2Hc=; X-YMail-OSG: FGa1jWMVM1nY5.u.HkIgMUOY3HzFewGsnVHEDp8RCpFmLbG lAn46MW.7dcnCXZXhk05oZ.e5AkvdUnh_GfYY0YOfgxlzjTWGQkMKNM5KLnE GRci5PPRMogMnxGJLV1q0yFROPQiU3e5.BElx6pVgDeocVZls7tNUHK7VzpS J2zXUqV9nlun23kdVk2aD9m1TjXu3xZgCJTlss4MEF0USCylk9v7yOkeO2wh zxScWZVx7cPmzWyoHCIM1MiUU9effZxhfrdLRlA36jhd_eN3_GAwRn5PxfC7 DxA1ToZ1H.eii_9CFDE.j3KWMSSuRlVdUklH2ca5rRa73Lmxs2fZ1QRXRx0R 8SqE6j8wojDLAOYYpY969eRgdItalSnaZ8mbVZN5IAy26xhaWmr_ptrL2o0u sO44iCnzyQioSlxquX1m5C5i78t8shUGw7uuEzgxxaEUrtqTVi1OF1CXEKYw 9pNZtkV4VWRFXy6Iof8QYM_Apybw- Received: from [216.194.22.4] by web38005.mail.mud.yahoo.com via HTTP; Wed, 14 Dec 2011 21:54:19 PST X-Mailer: YahooMailWebService/0.8.115.331698 References: <20111214070833.GA11058-at-panix.com> <1323908859.93530.YahooMailNeo-at-web38006.mail.mud.yahoo.com> <20111215045925.GA2102-at-horacrux> Message-ID: <1323928459.1868.YahooMailNeo-at-web38005.mail.mud.yahoo.com> Date: Wed, 14 Dec 2011 21:54:19 -0800 (PST) From: Elfen Magix Subject: Re: [NYLXS - HANGOUT] A simple perl script To: "hangout-at-mrbrklyn.com" In-Reply-To: <20111215045925.GA2102-at-horacrux> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-2114655128-818166892-1323928459=:1868" Sender: owner-hangout-at-mrbrklyn.com Precedence: bulk Reply-To: hangout-at-mrbrklyn.com
---2114655128-818166892-1323928459=:1868 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
I was thinking of Grep as well.=0A=0AThe problem is simple (maybe not):=0A-= Its a story text file in acsii.=0A-It has many chapters=0A-The chapter inde= x numbers 1 - 13 are fine, skips 14, and continues with 15 to 75.=0A-The fo= rmat of the chapter line (all 75 are in 1 file) is:=0A"Chapter XX: Chapter = Name" Where XX is any number from 0 - 9, counting all 75 chapters.=0A=0AI w= as 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.=0A=0Agrep 'Chapter' /= file name=A0 - gets the chapter lines and posts them. But changing them?=0A= =0ABTW- I can remove chapters 1 - 13 temporarily while this change happens.= =0A=0A=0A________________________________=0A From: Kevin Mark erizon.net>=0ASubject: Re: [NYLXS - HANGOUT] A simple perl script=0A =0AOn = Wed, Dec 14, 2011 at 04:27:39PM -0800, Elfen Magix wrote:=0A> I need a simp= le thing that goes through a file to find "Chapter [and a number]=0A> ". Th= en it must increment that number by 1 and resave the file without altering= =0A> nothing else.=0A> =0A> I know I've seen this, and even wrote one years= ago myself, but I cant for the=0A> life of me remember how!=0A> =0A> Thank= s.=0AThat is sort-of a loose definition for a program specification.=0Aif i= ts one line in one file, you can just open it in vi and search for it and f= ix it.=0Aif you need it done in 10's or 100's of places, if might be a few = lines of sed, awk or grep.=0A=0Agrep "Chapter" filename ---2114655128-818166892-1323928459=:1868 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
mes new roman, new york, times, serif;font-size:12pt">I was thinking of Gre= p as well. The problem is simple (maybe not): -Its a story text f= ile 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 cha= pter 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 changi= ng the numbers is what I cant figure out. grep 'Chapter' /file name&= nbsp; - gets the chapter lines and posts them. But changing them? BT= W- I can remove chapters 1 - 13 temporarily while this change happens. <= div style=3D"font-family: times new roman,new york,times,serif; font-size: = 12pt;"> font-size: 12pt;"> pan style=3D"font-weight: bold;">From: Kevin Mark <kevin.mark= -at-verizon.net> pan style=3D"font-weight: bold;">Subject: Re: [NYLXS - HANGOUT] = A simple perl script =0AOn Wed, Dec 14, 2011 at 04:27:39PM = -0800, Elfen Magix wrote: > I need a simple thing that goes through a= file to find "Chapter [and a number] > ". Then it must increment tha= t number by 1 and resave the file without altering > nothing else. >> > I know I've seen this, and even wrote one years ago myself, = but I cant for the > life of me remember how! > > Thanks= . That is sort-of a loose definition for a program specification. if = its one line in one file, you can just open it in vi and search for it and = fix it. if you need it done in 10's or 100's of places, if might be a fe= w lines of sed, awk or grep.
grep "Chapter" filename
= ---2114655128-818166892-1323928459=:1868--
---2114655128-818166892-1323928459=:1868 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
I was thinking of Grep as well.=0A=0AThe problem is simple (maybe not):=0A-= Its a story text file in acsii.=0A-It has many chapters=0A-The chapter inde= x numbers 1 - 13 are fine, skips 14, and continues with 15 to 75.=0A-The fo= rmat of the chapter line (all 75 are in 1 file) is:=0A"Chapter XX: Chapter = Name" Where XX is any number from 0 - 9, counting all 75 chapters.=0A=0AI w= as 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.=0A=0Agrep 'Chapter' /= file name=A0 - gets the chapter lines and posts them. But changing them?=0A= =0ABTW- I can remove chapters 1 - 13 temporarily while this change happens.= =0A=0A=0A________________________________=0A From: Kevin Mark erizon.net>=0ASubject: Re: [NYLXS - HANGOUT] A simple perl script=0A =0AOn = Wed, Dec 14, 2011 at 04:27:39PM -0800, Elfen Magix wrote:=0A> I need a simp= le thing that goes through a file to find "Chapter [and a number]=0A> ". Th= en it must increment that number by 1 and resave the file without altering= =0A> nothing else.=0A> =0A> I know I've seen this, and even wrote one years= ago myself, but I cant for the=0A> life of me remember how!=0A> =0A> Thank= s.=0AThat is sort-of a loose definition for a program specification.=0Aif i= ts one line in one file, you can just open it in vi and search for it and f= ix it.=0Aif you need it done in 10's or 100's of places, if might be a few = lines of sed, awk or grep.=0A=0Agrep "Chapter" filename ---2114655128-818166892-1323928459=:1868 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
mes new roman, new york, times, serif;font-size:12pt">I was thinking of Gre= p as well. The problem is simple (maybe not): -Its a story text f= ile 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 cha= pter 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 changi= ng the numbers is what I cant figure out. grep 'Chapter' /file name&= nbsp; - gets the chapter lines and posts them. But changing them? BT= W- I can remove chapters 1 - 13 temporarily while this change happens. <= div style=3D"font-family: times new roman,new york,times,serif; font-size: = 12pt;"> font-size: 12pt;"> pan style=3D"font-weight: bold;">From: Kevin Mark <kevin.mark= -at-verizon.net> pan style=3D"font-weight: bold;">Subject: Re: [NYLXS - HANGOUT] = A simple perl script =0AOn Wed, Dec 14, 2011 at 04:27:39PM = -0800, Elfen Magix wrote: > I need a simple thing that goes through a= file to find "Chapter [and a number] > ". Then it must increment tha= t number by 1 and resave the file without altering > nothing else. >> > I know I've seen this, and even wrote one years ago myself, = but I cant for the > life of me remember how! > > Thanks= . That is sort-of a loose definition for a program specification. if = its one line in one file, you can just open it in vi and search for it and = fix it. if you need it done in 10's or 100's of places, if might be a fe= w lines of sed, awk or grep.
grep "Chapter" filename
= ---2114655128-818166892-1323928459=:1868--
|
|