总结字节 [英] summarize bytes
问题描述
嗨
我想知道你是否可以给我一些脚本,因为我不知道perl。
我认为perl最适合我想要的东西请。
我有特殊类型的日志,如下所示:
ID - 是客户端ID
日期 - 服务器访问日期
IN - 发送到服务器的字节数
OUT - 从服务器收到的字节
ID日期输出
id12 2005-06-07 12 1091
id16 2005-06-07 893 17881
id12 2005-06-07 53 9912
id34 2005 -06-07 323 7211
id34 2005-06-07 15 2381
id34 2005-06-07 542 9771
id16 2005-06 -07 90 9912
id16 2005-06-07 409 6712
id12 2005-06-07 311 3443
id34 2005-06-07 342 1123
id12 2005-06-07 90 7455
id34 2005-06-07 145 512
id12 2005-06-07 88 1667
我想总结每天特定ID的IN和OUT字节
Fg
ID DATE TOTAL_IN TOTAL_OUT
id12 2005-06-07 12314 8098794
你能帮助我吗?
Hi
I wonder if you can point me to some scripts because I don''t know perl.
I think that perl is best for what I want to do.
I have special kind of logs which looks like following:
ID - is client id
Date - is server access date
IN - bytes sent to server
OUT - bytes received from server
ID DATE IN OUT
id12 2005-06-07 12 1091
id16 2005-06-07 893 17881
id12 2005-06-07 53 9912
id34 2005-06-07 323 7211
id34 2005-06-07 15 2381
id34 2005-06-07 542 9771
id16 2005-06-07 90 9912
id16 2005-06-07 409 6712
id12 2005-06-07 311 3443
id34 2005-06-07 342 1123
id12 2005-06-07 90 7455
id34 2005-06-07 145 512
id12 2005-06-07 88 1667
I want to summarize IN and OUT bytes for particular ID per day
Fg
ID DATE TOTAL_IN TOTAL_OUT
id12 2005-06-07 12314 8098794
Can you help me?
推荐答案
***发布通过post.newsfeed.com上的新闻阅读器免费***
*** post for FREE via your newsreader at post.newsfeed.com ***
> " bastardx" == bastardx< ba ****** @ S-P-A-Mop.pl>写道:
> "bastardx" == bastardx <ba******@S-P-A-Mop.pl> writes:
bastardx>你能帮帮我吗?
是的!访问 http://learn.perl.org ,阅读那里推荐的内容。 />
并停止发送到COMP.LANG.PERL,这是不存在的。
-
Randal L. Schwartz - Stonehenge Consulting Services,Inc。 - +1 503 777 0095
< me **** @ stonehenge.com> < URL:http://www.stonehenge.com/merlyn/>
Perl / Unix /安全咨询,技术写作,喜剧等。
请参阅PerlTraining.Stonehenge.com进行现场和开放式注册Perl培训!
----- =通过Newsfeed.Com发布,未经审查的Usenet新闻= -----
http://www.newsfeed.com - 世界排名第一的新闻组服务!
----- == 100,000个团体! - 19台服务器! - 无限下载! = -----
bastardx> Can you help me?
Yes! Visit http://learn.perl.org, and read the stuff recommended there.
And STOP POSTING TO COMP.LANG.PERL, which doesn''t exist.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<me****@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
-----= Posted via Newsfeed.Com, Uncensored Usenet News =-----
http://www.newsfeed.com - The #1 Newsgroup Service in the World!
-----== 100,000 Groups! - 19 Servers! - Unlimited Download! =-----
> bastardx>你能帮帮我吗?
> bastardx> Can you help me?
是的!访问 http://learn.perl.org ,阅读那里推荐的内容。 />
然后停止发送到COMP.LANG.PERL,它不存在。
Yes! Visit http://learn.perl.org, and read the stuff recommended there.
And STOP POSTING TO COMP.LANG.PERL, which doesn''t exist.
plonk
plonk
bastardx写道:
bastardx wrote:
id34 2005-06-07 323 7211
id34 2005-06-07 15 2381
id34 2005-06-07 323 7211
id34 2005-06-07 15 2381
在Perl中使用一两个哈希是微不足道的。
这是学生练习中发现的那种东西。
in几乎任何Perl教程的前几章。
提示:
That''s trivial to do using a hash or two in Perl.
It''s the sort of thing found as student exercises
in early chapters of just about any Perl tutorial.
Hint:
这篇关于总结字节的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!