Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: File download statistics parsing

by l2kashe (Deacon)
on Aug 07, 2003 at 14:48 UTC ( [id://281909]=note: print w/replies, xml ) Need Help??


in reply to File download statistics parsing

# snip ... # I know this is evil, it's a hack. my $count = `/bin/grep $basefile /var/log/squid/access.log | /usr/bin/wc -l`; $count =~ s/^\s+//g; # so lets not hack it.. open(IN, "/var/log/squid/access.log") or die "opening access.log: $!\n +"; my $count = grep(/$basefile/, <IN>); close(IN);

Happy hacking :)

use perl;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-19 02:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found