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 |
Jump to:
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
oops! thanks.
#2
Automatically closed -- issue fixed for two weeks with no activity.