Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Perlify some awk'ing for SPAM graphing

by hacker (Priest)
on Jun 24, 2003 at 13:21 UTC ( #268489=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
       grep ^"From " SPAM-mbox |   \
       awk '{$1 = $2 = $6 = "";    \
    ...
       sort |                      \ 
       sed s/-$//g |               \
       uniq -c > spamstatfile
    
  2. or download this
          1 --Fri-Jun-13--2003
          1 --Fri-Jun-20--2003
          2 --Mon-Jun-9--2003
         10 --Tue-Jun-24--2003
          3 --Wed-Jun-11--2003
          1 --Wed-Jun-18--2003
    
  3. or download this
       set xdata time
       set timefmt "%b-%d-%Y"
       plot "spamstatfile" using 1:2
    
  4. or download this
    perl -lane '$h{"$F[3]-$F[4]-$F[6]"}++ 
         if /^From /; END {
            print $_, "\t", $h{$_} for keys %h
         }' SPAM  > spamdates
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://268489]
Approved by gellyfish
Front-paged by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2014-12-28 17:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (182 votes), past polls