MESSAGE
DATE | 2011-12-14 |
FROM | Kevin Mark
|
SUBJECT | Re: [NYLXS - HANGOUT] A simple perl script
|
From owner-hangout-outgoing-at-mrbrklyn.com Wed Dec 14 23:57:48 2011 Return-Path: X-Original-To: archive-at-mrbrklyn.com Delivered-To: archive-at-mrbrklyn.com Received: by www2.mrbrklyn.com (Postfix) id ED6B9FFEAA; Wed, 14 Dec 2011 23:57:47 -0500 (EST) Delivered-To: hangout-outgoing-at-www2.mrbrklyn.com Received: by www2.mrbrklyn.com (Postfix, from userid 28) id DE1CB100B4A; Wed, 14 Dec 2011 23:57:47 -0500 (EST) Delivered-To: hangout-at-mrbrklyn.com Received: from nm14.access.bullet.mail.mud.yahoo.com (nm14.access.bullet.mail.mud.yahoo.com [66.94.237.215]) by www2.mrbrklyn.com (Postfix) with SMTP id 39BA8FFEAA for ; Wed, 14 Dec 2011 23:57:46 -0500 (EST) Received: from [66.94.237.195] by nm14.access.bullet.mail.mud.yahoo.com with NNFMP; 15 Dec 2011 04:59:26 -0000 Received: from [66.94.237.99] by tm6.access.bullet.mail.mud.yahoo.com with NNFMP; 15 Dec 2011 04:59:26 -0000 Received: from [127.0.0.1] by omp1004.access.mail.mud.yahoo.com with NNFMP; 15 Dec 2011 04:59:26 -0000 X-Yahoo-Newman-Id: 895500.27312.bm-at-omp1004.access.mail.mud.yahoo.com Received: (qmail 78837 invoked from network); 15 Dec 2011 04:59:26 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1323925166; bh=ZFDQ/tlgKFEvZHalg8gdJtbI/Zmn0b56EJYx1a9jNQI=; 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=FkubC3VfWrtgxreTzaQ/UFSty+N0fi9IwJ8A93Mtgz2ALqdzcq8CDoj1uY1/SOlJRZ9xiWWmeScLS0YDkO4GwcxPUTJ4M9mdwLlOLR3OfGMNpHqZvWsIpnwuu6SBwyRVpd4Bt63pJ9DGg1U5zQ4bn37AVbYgNMsWzzTnaF9jhfY= X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: x9fA0EYVM1l3MsVLJFzoy0ChksYjfFhFxEGIQSccngIAhCf 7p7CAnw.0vPql1AVRSxNpXGxoeiP0Tw8CuBDTyNIeLA7tVrywbqGYSoff3OJ .rlQ8n8HIVircjk49k1BNgq.nA3PhbrSeU9aHLnwj.gMqwAueG4FDFO1cH00 KeDVbSzZClWzeEOMJUYXFSGkpYns1zLbykbS91RSwKD.BMYn8Sx0Tw2x3Y2M cTjnSzQF6mAV3ByG18TFNJbmkFhVAsqiTOPnnppdmctTy6z95Wc6wVyyEQ3S 7vbGMhR1fi5y50nf00ZT0l67MpwuOypfZRunKKJQYkdzpzIdl1Un5ajaX.rS 05Nu7g6MOIOPtDtoRGkGKkxkY9763aHabflUT3HOoywOfhJDfzl3duUVQQZE pumk8EVUpHr_fJc9iB38LtiraymAacLstsFoVVE.8t4ObbN9O6NPiaN2lcGA dUQ6vJ7fod1KCX7LXhmRkyYydPAFb9mVO0zz28QCGWbGaeLEyGvwrsC5N3Kg ZBI9i20KcP3PKpskut7eFN52itYgO0syEnpIG15lWsPx_7SXqYdVYR0FJKvp 2KPEaSDzx5F8BQAb_aqx72uFAdZo6fC36Wl3x_._k5LXnvZluyu.w_GLjmVc SkFPb7Ltyd2c- 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; 14 Dec 2011 20:59:26 -0800 PST Received: from kevin by horacrux with local (Exim 4.74) (envelope-from ) id 1Rb3Pi-00012P-1F for hangout-at-mrbrklyn.com; Wed, 14 Dec 2011 23:59:26 -0500 Date: Wed, 14 Dec 2011 23:59:26 -0500 From: Kevin Mark To: hangout-at-mrbrklyn.com Subject: Re: [NYLXS - HANGOUT] A simple perl script Message-ID: <20111215045925.GA2102-at-horacrux> References: <20111214070833.GA11058-at-panix.com> <1323908859.93530.YahooMailNeo-at-web38006.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1323908859.93530.YahooMailNeo-at-web38006.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 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 that 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 few lines of sed, awk or grep.
grep "Chapter" filename would be the basic idea -- | .''`. == 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._________|
* TwingyAFK is shopping for 17" flat panel * aav sells TwingyAFK a piece of plywood
|
|