Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: matching datetimestamps and concatenating data where timestamps match from multiple large datafiles

by RichardK (Parson)
on Sep 22, 2013 at 12:19 UTC ( #1055181=note: print w/replies, xml ) Need Help??


in reply to matching datetimestamps and concatenating data where timestamps match from multiple large datafiles

I assume that your files must be already sorted as they're log files, then what you are trying to do is a type of Merge Sort

You can then process you files one line at a time. Read the current line for fileA and decide if you want to write the current lines for fileB and fileC, and when you write a line from a file get the next one. Keep going until you run out of lines.

  • Comment on Re: matching datetimestamps and concatenating data where timestamps match from multiple large datafiles

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1055181]
help
Chatterbox?
[Tanktalus]: SwaJime: wouldn't status & status < 13 be true if status was 0?
[SwaJime]: I thought 0 was false, and false AND anything would be false ...
[SwaJime]: unless & is higher precedence than <
[SwaJime]: couldn't find bitwise in precedence list for sybase
[SwaJime]: I bet that is why ... and that makes it to be I think terribly written code :-|

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2017-08-22 18:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (338 votes). Check out past polls.

    Notices?