fetchdb.sh doesn't work for the latest IP database update

ekrispin - November 5, 2007 - 19:47
Project:IP to Country
Version:5.x-1.0
Component:Miscellaneous
Category:bug report
Priority:normal
Assigned:sugree
Status:closed
Description

The problem:
For the latest IP database update from http://ip-to-country.webhosting.info (dated October 31 2007), the fetchdb.sh utility enclosed in the IP2cc dir does not convert ip-to-country.csv to ipdb.mysql properly (awk processes the first line only and does not iterate for each line)

The solution:
The reason for the above problem is that the latest ip-to-country.csv is not a DOS csv for some reason and therefore the line separator is different.
In order to fix the problem, omit in fetchdb.sh in the awk command the parameter -v RS='\r\n' thus having the default record separator character as a standard "newline". It works that way.

------
ekrispin
www.openify.com

#1

sugree - December 3, 2007 - 03:18
Assigned to:Anonymous» sugree
Status:active» fixed

oops! thanks.

#2

Anonymous - December 17, 2007 - 03:22
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.