Printer Accounting File Parsing

BKEHOE%widener at pucc.princeton.edu BKEHOE%widener at pucc.princeton.edu
Sat Aug 11 06:36:28 AEST 1990


 Here's something that should be simple to solve..it can be in anything (C/
awk/shell/whatever).
 I need to parse down the results of the printer accounting file into a total
for each user for that 2-week or month-long period of time, and send mail to
those users that've gone above 50 pages saying something like "Calm down".
I've been futzing in awk but can't seem to pull it off -- and in C my string
manipulation seems to be off (admittedly I haven't spent a *lot* of time
hacking it out).
 Oh, I'm running SunOS 4.0.3 if yer interested. Here's what the file typically
looks like:

--cut--
	 2.00	laverne:brendan
	 3.00	shirley:quairoli
	17.00	laverne:doan
	 1.00	sabrina:neveln
	 5.00	laverne:jennifer
	 9.00	ashley:ware
--cut--
 It'd be nice if I could assess the # of pages they print off of each client
too, but that may be overkill.
 Thanks for your help..

Brendan Kehoe (bkehoe at widener.bitnet)



More information about the Comp.unix.questions mailing list