Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Perlify some awk'ing for SPAM graphing

by jmcnamara (Monsignor)
on Jun 24, 2003 at 13:49 UTC ( #268503=note: print w/ replies, xml ) Need Help??


in reply to Perlify some awk'ing for SPAM graphing


For my mbox file the following one-liner gives the same output as your program, except that the columns are reversed (as requested) and the data is unsorted:

perl -lane '$h{"--$F[2]-$F[3]-$F[4]--$F[6]"}++ if /^From /; / END{print $_, "\t", $h{$_} for keys %h}' SPAM-mbox

If you need sorted data you could use the system sort or add sort before keys above:

--
John.


Comment on Re: Perlify some awk'ing for SPAM graphing
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://268503]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2015-07-05 02:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls