Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!sun-barr!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!unisoft!hoptoad!hsfmsh!mhyman From: mhyman@hsfmsh.UUCP (Marco S. Hyman) Newsgroups: news.admin Subject: Re: question on bad newsgroups Summary: Fix for bad newsgroup names in report.awk Keywords: nomatch Message-ID: <792@hsfmsh.UUCP> Date: 31 May 89 16:43:53 GMT References: <185@icdi10.uucp> <804@ivucsb.sba.ca.us> <199@icdi10.UUCP> Reply-To: mhyman@hsfmsh.UUCP (Marco S. Hyman) Distribution: na Organization: SoftCom, Inc. San Francisco Lines: 42 In article <199@icdi10.UUCP> fr@icdi10.UUCP (Fred Rump from home) writes: > In article <804@ivucsb.sba.ca.us> news@ivucsb.UUCP (Todd Day) writes: > >In article <185@icdi10.uucp> fr@icdi10.UUCP (Fred Rump from home) writes: > >~Bad Newsgroups Received > >~a.politic 18 This is the stuff I'm talking about. > >~a.single 1 > >~alk.politics.gun 5 > >~lt.bb 1 > >~lt.conspirac 1 ... > I don't know enough about awk to find the problem but I think it is created in > Eric Fair's awk script originally written in May, 1984 to give some news stats. > > I don't want to post the whole script but here is the part that prints: I've mailed this to enough people that I might as well post it. It's not the part that prints that truncates the first and last character. Look for the lines (approx. line 200): $5 == "Unknown" { x = length($7) - 2; ng = substr($7, 2, x); badng[ng]++; badgrp++; next; } Replace them with: $5 == "Unknown" { badng[$7]++; badgrp++; next; } This will fix the problen. --marc -- //Marco S. Hyman //UUCP: ...!sun!sfsun!hsfmsh!mhyman //Domain: sfsun!hsfmsh!mhyman@sun.com