[Classiccity-pm] basic idiot question

nathan r. hruby nhruby at uga.edu
Sat Oct 25 17:02:41 CDT 2003


On Sat, 25 Oct 2003, Jeff Scarbrough wrote:

> >To make your life easier (assuming I'm understanding your needs
> >correctly), you could cat them all into one file and then run sort on
> >them, which should put everything in consecutive order, then All you need
> >to do is have your perl script just insert empty values where needed and
> >do any other post processing.
> 
> All of the data from the various files for a given minute needs to be on 
> one line...I'm not sure if cat and sort could do that - could it?
> 

I don't think so, at least not easily.  Sorry I didn't realize that all
the data needed to be one one line.

You could cat | sort them into one file to make the parsing easier
though..  Read a line, buffer it, read the next line, if the timestamp is
the same, add it to the buffer, wash-rinse-repeat till you get to the next
timestamp, output the buffered line you've been appending to, and start 
over.  In this case the hash idea Hazen brought up would be an ideal 
storage conatiner for the "buffered" data.

This of course assumes that each line can tell you where it came from, as 
sort may or may not always put them in the same order per sample group.

-n
-- 
-------------------------------------------
nathan hruby <nhruby at uga.edu>
uga enterprise information technology services
production systems support
metaphysically wrinkle-free
-------------------------------------------



More information about the Classiccity-pm mailing list