From Tread:
http://www.linuxquestions.org/questi...0/#post4509101
I see this is a pretty nice solution.
I do need something very similar to this.
I have two cvs files (geodata files)
One have 3 columns (lets call file_1) and the other 5 columns (lets call file_2)
file_1 is like this:
startIpNum,endIpNum,locId
"16777216","16777471","17"
"16777472","16777727","24328"
"16777728","16778239","49"
file_2 is like this:
geo_id,country,region,city,postalCode
32,BR,,,
19304,BR,SP,São Paulo,
24328,BR,RJ,Rio De Janeiro,
22975,BR,SP,Salto,
What I need is to create a new file (lets call file_3) that match the field locId of the file_1 with the field geo_id of the file_2
In other words, if a field locId (file_1) and a field gep_id (file_2) are equal, generate a file_3 with the row of file_1 that matched the criteria.
Example.
Using the tables above and running the script the resulting file_3 would be
startIpNum,endIpNum,locId
"16777472","16777727","24328"
Which is the locId "24328" (file_1) matched the geo_id "24328" (file_2) and generate the resulting file_3
Is this hard to make?
Thanks.