View Single Post
  #27 (permalink)  
Old 01-15-2009, 05:39 PM
edraven's Avatar
edraven
Lurker
Offline
 
Join Date: Aug 2007
Posts: 16
Reputation: 5
edraven is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Lookup City based on Caller ID

Quote:
Originally Posted by edraven View Post
Doesn't look too hard to parse either
awk gets you most of the way there, this is for a CSV output:

cat allutlzd.txt |awk -F"\t" '{print $1","$2","$4","$5}'

output is like this:

AK ,907-200,"ACS WIRELESS, INC." ,VALDEZ
AK ,907-209,"DOBSON CELLULAR SYSTEMS, INC." ,JUNEAU

but of course you'll want to modify it to output in .reg format...

something like this maybe?

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\HTC\PHONE\AreaCode\]

[HKEY_LOCAL_MACHINE\SOFTWARE\HTC\PHONE\AreaCode\\41 5]

[HKEY_LOCAL_MACHINE\SOFTWARE\HTC\PHONE\AreaCode\\41 5\343]
"Company"="MCI WORLDCOM COMMUNICATIONS, INC., CA"
"RateCenter"="SNFC CNTRL"
"State"="CA"

[HKEY_LOCAL_MACHINE\SOFTWARE\HTC\PHONE\AreaCode\\41 5\344]
"Company"="PACIFIC BELL"
"RateCenter"="SNFC CNTRL"
"State"="CA"

Last edited by edraven; 01-15-2009 at 05:56 PM.
Reply With Quote