🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.lang.awk
Article #35

How do I skip first match??

#35
From: essbee
Date: Thu, 31 May 2001 05:09
14 lines
1663 bytes
All,

Newbie help required for awk in skipping the first match.

I have a file that has two occurrences of "while(1)". I need to skip the
first one and replace the second one with "while (x>MAXLOOP)" - how can I
accomplish this? Pl note that the number of lines between the two "while"
occurrences is not same for all files being processed.

Any help???

Thanks!!

essbee
Technical Details
Message-ID: <kmkR6.54300$t12.4285836@bgtnsc05-news.ops.worldnet.att.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.cwix.com!wn2feed!worldnet.att.net!135.173.83.71!wnfilter1!worldnet-localpost!bgtnsc05-news.ops.worldnet.att.net.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10ad19,8420015e5e3d2662,start
X-Google-Attributes: gid10ad19,public
X-Google-Thread: 109023,8420015e5e3d2662,start
X-Google-Attributes: gid109023,public
X-Google-Thread: 116030,8420015e5e3d2662,start
X-Google-Attributes: gid116030,public
X-Google-ArrivalTime: 2001-05-30 22:09:37 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.cwix.com!wn2feed!worldnet.att.net!135.173.83.71!wnfilter1!worldnet-localpost!bgtnsc05-news.ops.worldnet.att.net.POSTED!not-for-mail
From: "essbee" <spare_brain@yahoo.com>
Newsgroups: alt.lang.awk,comp.lang.awk,fj.comp.lang.awk
Subject: How do I skip first match??
Lines: 16
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Message-ID: <kmkR6.54300$t12.4285836@bgtnsc05-news.ops.worldnet.att.net>
Date: Thu, 31 May 2001 05:09:36 GMT
NNTP-Posting-Host: 12.89.129.125
X-Complaints-To: abuse@worldnet.att.net
X-Trace: bgtnsc05-news.ops.worldnet.att.net 991285776 12.89.129.125 (Thu, 31 May 2001 05:09:36 GMT)
NNTP-Posting-Date: Thu, 31 May 2001 05:09:36 GMT
Organization: AT&T Worldnet