I have log file with three comma separated pieces of data.
A userid, a printer queue and a page count for that specific print job.
A userid appears multiple times, once for each print job.
A userid might print to different printers on different queues.
I’m spinning my wheels on trying to figure out how to collate the data. I’d like to have an end result that gives me a userid for each print queue and the total number of pages they sent to that print queue.
Example data
user1,PGP160,2
user2,INSTISS1,1
user2,INSTISS1,1
user1,PGP165,1
user3,PGP114,4
user4,PGP103,1
user4,PGP103,1
Getting the user, queue and pages printed is easy enough but I’m having trouble figuring a way to sort the user into a unique list, the print queue into a unique list and total the pages printed by the user to that queue while keeping the data collated.
Any suggestions on how I can approach this?
Edit - The data I’d like to have in the end would have the above appear as follows.
user1,PGP160,2
user1,PGP165,1
user2,INSTISS1,2
user3,PGP114,4
user4,PGP103,2