Re: Lookup City based on Caller ID
That'd probably be better, but if you change your mind, I just finished the script. This uses TCL.
#!/usr/bin/tclsh
set f [open allutlzd.txt r]
puts "Windows Registry Editor Version 5.00"
while {[gets $f line] != -1} {
set field [split $line "\t" ]
set tmp [split [lindex $field 1] -]
set state [string trim [lindex $field 0]]
set areaCode [string trim [lindex $tmp 0]]
set prefix [string trim [lindex $tmp 1]]
set company [string trim [lindex $field 3]]
regsub -all {"} $company {} company
set rateCenter [string trim [lindex $field 4]]
#puts "$areaCode $prefix $company $rateCenter $state"
if {[regexp {[0-9]{3}} $areaCode]} {
puts "
\[HKEY_LOCAL_MACHINE\\SOFTWARE\\HTC\\PHONE\\AreaCode \\\\$areaCode\\$prefix\\]
\"Company\"=\"$company\"
\"RateCenter\"=\"$rateCenter\"
\"State\"=\"$state\"
"
}
}
close $f
|