Reply
Thread Tools
Posts: 27 | Thanked: 8 times | Joined on Aug 2010
#1
Hi
According to the ministry of communication in my country, All communications companies are changing all mobile numbers by adding a single digit to all numbers and I need a script to edit my contacts cuz I cannot edit them manually , it's impossible

the script should do the following
all numbers begininig with 011 or 014 or 0152 ... another 1 should be added after the first 1 so they become 0111, 0114 , 01152
and all 010, 016, 0151 should be 0100, 0106, 01051
and all 012, 018, 0150 should be 0122, 0128, 01250

can anyone even tell me how to write scripts .. I already have a good background in C/C++ programming
because the deadline is this month !!!! or i wont be able to use the old numbers
Thanks alooot
 
zlatko's Avatar
Posts: 861 | Thanked: 936 times | Joined on Feb 2010 @ Bulgaria
#2
I think easiest solution is:
1. Export all contacts.
2. Concatenate all produced .vcf files to one long .vcf file containing all your contacts.
3. Using vi editor(or one of your choice) replace all numbers you want.
4. Re-import the edited multicontact .vcf file in your phonebook.

No need of programming skills and will take 5 minutes.
 
Posts: 62 | Thanked: 13 times | Joined on Sep 2010 @ New York City
#3
So does that mean all the mobile phones in your country will not work at the end of the month ? What country are you in ? What part of the phone number are you referring to ? All new phones allows you edit numbers , unless I'm missing something!
 
Posts: 41 | Thanked: 10 times | Joined on Dec 2011
#4
Originally Posted by sensortk View Post
Hi
According to the ministry of communication in my country, All communications companies are changing all mobile numbers by adding a single digit to all numbers and I need a script to edit my contacts cuz I cannot edit them manually , it's impossible

the script should do the following
all numbers begininig with 011 or 014 or 0152 ... another 1 should be added after the first 1 so they become 0111, 0114 , 01152
and all 010, 016, 0151 should be 0100, 0106, 01051
and all 012, 018, 0150 should be 0122, 0128, 01250

can anyone even tell me how to write scripts .. I already have a good background in C/C++ programming
because the deadline is this month !!!! or i wont be able to use the old numbers
Thanks alooot
اخي في برنامج بمتجر نوكيا اسمه MeegoEgypt cotact Modifier

Dear There is an APP. for this Prob it's "MeegoEgypt cotact Modifier" you can find it in STORE of N9
 
Posts: 27 | Thanked: 8 times | Joined on Aug 2010
#5
Originally Posted by zlatko View Post
I think easiest solution is:
1. Export all contacts.
2. Concatenate all produced .vcf files to one long .vcf file containing all your contacts.
3. Using vi editor(or one of your choice) replace all numbers you want.
4. Re-import the edited multicontact .vcf file in your phonebook.

No need of programming skills and will take 5 minutes.
Thanks for your care

nice simple way but whats VI editor ? how can I make it edit all numbers in the vcf file ??
 
Posts: 27 | Thanked: 8 times | Joined on Aug 2010
#6
Originally Posted by louiegoat View Post
So does that mean all the mobile phones in your country will not work at the end of the month ? What country are you in ? What part of the phone number are you referring to ? All new phones allows you edit numbers , unless I'm missing something!
you got it all wrong
the first part of all numbers are edited because numbers are increasing and the 7 digit number isnt enough for the increasing mobile phones becides... to unify the first 3 digits for each of the three communication companies (all the first company customers will begin with 010 and the second will be 011 and third will be 012 ..)

anyway there have been many android, BB, iOS and Nokia symbian apps for this issue but noone made an app for N900 :S and I cant edit 500 contacts manually man !!

i.e: all phones in my country will work except mine
 
Posts: 27 | Thanked: 8 times | Joined on Aug 2010
#7
Originally Posted by drzmbs View Post
اخي في برنامج بمتجر نوكيا اسمه MeegoEgypt cotact Modifier

Dear There is an APP. for this Prob it's "MeegoEgypt cotact Modifier" you can find it in STORE of N9
ok thats a meego app .. will it work on maemo ??
 
Posts: 62 | Thanked: 13 times | Joined on Sep 2010 @ New York City
#8
Originally Posted by sensortk View Post
you got it all wrong
the first part of all numbers are edited because numbers are increasing and the 7 digit number isnt enough for the increasing mobile phones becides... to unify the first 3 digits for each of the three communication companies (all the first company customers will begin with 010 and the second will be 011 and third will be 012 ..)

anyway there have been many android, BB, iOS and Nokia symbian apps for this issue but noone made an app for N900 :S and I cant edit 500 contacts manually man !!

i.e: all phones in my country will work except mine
Oh okay. So then it would be like an area code plus another three digits and then your seven digit phone number is that correct ? Eventually they would have to do something since almost every person now has a cell phone. Hope you find a solution soon, good luck !
 
zlatko's Avatar
Posts: 861 | Thanked: 936 times | Joined on Feb 2010 @ Bulgaria
#9
@sensortk
vi editor is text editor with text ui. Very powerful and widely used on *nix OS.
It is very simle to do such substitutions once you have learned it. Here is an example. Let suppose the number you want to change is: +555 012 123 456 In .vcf line with that mobile number looks like this:
Code:
 TEL;TYPE=CELL:+55512123456
In it if you want to convert all numbers starting with (0)12 to (0)122 you use this command:
Code:
:%s/+55512/+555122/g
This will substitute all occurrences of "+55512" to "+55122", will take you like 1 minute.
You have to do this for all codes you want to change.
 
Posts: 432 | Thanked: 917 times | Joined on Jun 2011
#10
Does anyone managed to deal with that task ? I'm in the same situation... I need to add a "9" before every phone number that BOTH starts with 9 or 8 AND have 8 digits and wouldn't like to edit every each .vcf on a text editor. Does anyone wrote a script that i can adapt to my case ? i'd be eternally gratefull if someone share such piece of code.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 07:51.