473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

summarize bytes

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?
Jul 19 '05 #1
10 3101
*** post for FREE via your newsreader at post.newsfeed.com ***
> "bastardx" == bastardx <ba******@S-P-A-Mop.pl> writes:


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! =-----

Jul 19 '05 #2
> 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.


plonk
Jul 19 '05 #3
bastardx wrote:
id34 2005-06-07 323 7211
id34 2005-06-07 15 2381


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:
$info{$id}{IN} += $in;
$info{$id}{OUT} += $out;

-Joe
Followup-To has been set to comp.lang.perl.misc
Jul 19 '05 #4
bastardx wrote:
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.


plonk


I wonder if you have any idea at all whom you just plonked.....
Yes, it is *the* Randal L. Schwartz.

Concidering your past contribution to the Perl community (you did
contribute, didn't you?) I am quite certain that nobody will follow your
your public plonk. Rather the other way round.

jue
Jul 19 '05 #5
> I wonder if you have any idea at all whom you just plonked.....
Yes, it is *the* Randal L. Schwartz.

I dont know him and never will, I hope :)
anyway to be "the Randal L. Schwartz" is no excuse to be rude.
excuse me "stupid" question if it realy was
eos
best regards
Jul 19 '05 #6
*** post for FREE via your newsreader at post.newsfeed.com ***
> "Jürgen" == Jürgen Exner <ju******@hotmail.com> writes:
plonk


Jürgen> I wonder if you have any idea at all whom you just plonked.....

Besides, plonk'ing an *answerer* is useless. Plonk is a clue for all
answer-givers to ignore future questions from a given clueless person.

So, all you end up with is fewer (correct) answers. Your choice. :)

--
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! =-----

Jul 19 '05 #7
Don't be so sure --- I'm with bastardx on this one.
Jul 19 '05 #8
thoomas wrote:
Don't be so sure --- I'm with bastardx on this one.


If you would have quoted some context like it has been a proven Usenet
custom for over 2 decades then people might actually know what you are
agreeing with.

jue

Jul 19 '05 #9
Right, and this NG doesn't exist, either.

Jul 19 '05 #10
thoomas wrote:
Right, and this NG doesn't exist, either.


What are you agreeing with?
Would you mind quoting some context such that people have a chance to know
what your talking about?

jue
Jul 19 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: chris_wood80 | last post by:
Is there a way to summarize text in a report section footer, almost the equivalent of =Sum(Quantity) for text. One order can contain multiple line items of either the same product or of several...
2
by: ecoulson123 | last post by:
I am using Access 2000. I am trying to summarize numeric data from a large database. The problem is that I need the summarization functions to ignore "junk" data, defined in a couple ways. ...
19
by: Lorenzo J. Lucchini | last post by:
My code contains this declaration: : typedef union { : word Word; : struct { : byte Low; : byte High; : } Bytes; : } reg;
2
by: mmiikkee | last post by:
I have a large (perhaps small) table (foo) of 48 Million rows and I have a temp table which I load with keys (2 to 3 Mil). I use the temp table to extract and aggregate some columns from foo...
4
by: robin | last post by:
hello list, does anyone know of a library which permits to summarise text? i've been looking at nltk but haven't found anything yet. any help would be very welcome. thank you all in advance, ...
2
by: rcamarda | last post by:
I've been trying to solve this problem for better of 4 days: We summarize registrations of students on a daily basis, however they are net changes. Example: A student registers one class for...
3
by: access baby | last post by:
when i creat query from Query Wizard and select the fields from table and click next it doesnt show me the option of Detail / Summary why is it so? i need to create query or say summarize data...
3
beacon
by: beacon | last post by:
Hey everybody, I'm using 2003 and wondering if there's a way to count the data for multiple sections in a report and summarize it at the end of the section. For instance, I have a report with a...
2
by: Ducknut | last post by:
Hi all, I was thinking that an expert like FishVal might be interested in solving this one (based on his name). I have several fish tagged with radio telemetry tags. These tags send a signal to a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.