Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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 surveying the Monastery: (10)
As of 2014-09-23 20:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (241 votes), past polls