Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!sundc!rlgvax!bdmrrr!shprentz From: shprentz@bdmrrr.bdm.com (Joel Shprentz) Newsgroups: news.software.b Subject: Re: Another way to count news articles by date Message-ID: <819@bdmrrr.bdm.com> Date: Fri, 16-Jan-87 09:27:08 EST Article-I.D.: bdmrrr.819 Posted: Fri Jan 16 09:27:08 1987 Date-Received: Thu, 22-Jan-87 06:26:37 EST References: <286@desint.UUCP> Organization: BDM Corporation, McLean, Virginia Lines: 23 Summary: Fast script for 2.11 news history files In article <286@desint.UUCP>, geoff@desint.UUCP (Geoff Kuenning) writes: > > From: stephen@comp.lancs.ac.uk (Stephen J. Muir) > > ... So here is a wee awk script to print out the number of news articles > > received on each date in the history file: > > I liked the idea, but found the script slow. Here's what I came up with: > > sed 's/[^\t]*\t\([A-Za-z]* *[0-9]*\).*/\1/' /usr/lib/news/history \ > | uniq -c I liked Geoff's improvement, but found it didn't work here. I suspect it is for an older style of history file. Here is a similar script that works for 2.11 history files. As with Geoff's script, replace \t with a tab (in two places) before running it. sed -e 's/[^\t]*\t *//' -e '/[a-z]/!d' -e '/cancelled/d' \ -e 's/ .*//' /usr/lib/news/history | uniq -c -- Joel Shprentz Phone: (703) 848-7305 BDM Corporation Uucp: seismo!bdmrrr!shprentz 7915 Jones Branch Drive shprentz@bdmrrr.bdm.com McLean, Virginia 22102