Obsidian
|
2014-04-30
, 13:54
|
Posts: 10 |
Thanked: 29 times |
Joined on Jun 2010
@ Germany
|
#11
|
The Following User Says Thank You to Obsidian For This Useful Post: | ||
|
2014-04-30
, 13:57
|
Posts: 147 |
Thanked: 150 times |
Joined on Aug 2010
@ Finland
|
#12
|
The Following User Says Thank You to Aonsaithya For This Useful Post: | ||
|
2014-04-30
, 14:23
|
Posts: 432 |
Thanked: 917 times |
Joined on Jun 2011
|
#13
|
Try this in the folder where your vcf files are:
.Code:grep -l ':+[89][0-9]\{7\}$' *.vcf | xargs sed -i '/:+[89][0-9]\{7\}$/s/\+/\+9/g'
~/Exported contacts$ grep -l ':+[89][0-9]\{7\}$' *.vcf | xargs sed -i '/:+[89][0-9]\{7\}$/s/\+/\+9/g' sed: no input files
~/MyDocs/Exported contacts $ grep -l ':+[89][0-9]\{7\}$' *.vcf | xargs sed -i ' /:+[89][0-9]\{7\}$/s/\+/\+9/g' sed: -i requires an argument
|
2014-04-30
, 14:31
|
Posts: 432 |
Thanked: 917 times |
Joined on Jun 2011
|
#14
|
I'd just sync the contacts to Outlook or similar, export them to an excel file, modify the information with functions or such and finally reverse the process to get the updates to the phone.
|
2014-04-30
, 22:31
|
Posts: 10 |
Thanked: 29 times |
Joined on Jun 2010
@ Germany
|
#15
|
The Following User Says Thank You to Obsidian For This Useful Post: | ||
|
2014-05-01
, 00:48
|
Posts: 432 |
Thanked: 917 times |
Joined on Jun 2011
|
#17
|
It's a combination of two commands: the grep lists all the files that match the pattern (regular expression) and hands them over to the sed, that does the find & replace part.
If the grep doesn't find any files, it won't work. The pattern I used is:
1. a colon (
2. a plus-sign (+)
3. either 8 or 9
4. seven digits (from 0 to 9)
5. end of line ($)
Maybe you find a pattern that works or you give me an anonymised vcf-file for testing purposes.
|
2014-05-01
, 00:49
|
Posts: 432 |
Thanked: 917 times |
Joined on Jun 2011
|
#18
|
|
2014-05-01
, 08:05
|
Posts: 10 |
Thanked: 29 times |
Joined on Jun 2010
@ Germany
|
#19
|
grep -l ':[89][0-9]\{7\}$' *.vcf | xargs sed -i '/:[89][0-9]\{7\}$/s/\+/\+9/g'
The Following User Says Thank You to Obsidian For This Useful Post: | ||
|
2014-05-01
, 19:56
|
|
Posts: 4,117 |
Thanked: 8,901 times |
Joined on Aug 2010
@ Ruhrgebiet, Germany
|
#20
|
sed '/:[89][0-9]\{7\}\>/s/:/:9/g' -i *.vcf
The Following User Says Thank You to peterleinchen For This Useful Post: | ||