Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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 romping around the Monastery: (15)
As of 2014-07-30 16:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (235 votes), past polls