saponga
|
2014-05-01
, 20:51
|
Posts: 432 |
Thanked: 917 times |
Joined on Jun 2011
|
#21
|
|
2014-05-01
, 20:56
|
|
Posts: 4,118 |
Thanked: 8,901 times |
Joined on Aug 2010
@ Ruhrgebiet, Germany
|
#22
|
|
2014-05-02
, 19:40
|
Posts: 191 |
Thanked: 415 times |
Joined on Jan 2012
|
#23
|
#!/bin/sh # TEL;TYPE=CELL,VOICE:0118765-4321 for i in *.vcf; do sed -i -r -f 9th-digit-tim.sed $i done
# remove format chars /^TEL/ s/[\(\)\ \.-]//g # cell phones of SP with 8 digits -> 0 41 DDD 9XXXX /^TEL/ s/:(1[1-9])([6-9][0-9]{3})([0-9]{4})/:0 41 \1 9\2 \3/p /^TEL/ s/:0(1[1-9])([6-9][0-9]{3})([0-9]{4})/:0 41 \1 9\2 \3/p # cell phones without ddd /^TEL/ s/:([6-9][0-9]{3})([0-9]{4})/:9\1 \2/p # cell phone with ddd /^TEL/ s/:([2-9][1-9])([6-9][0-9]{3})([0-9]{4})/:0 41 \1 \2 \3/p /^TEL/ s/:0([2-9][1-9])([6-9][0-9]{3})([0-9]{4})/:0 41 \1 \2 \3/p # non-cell phones /^TEL/ s/:([2-5][0-9]{3})([0-9]{4})/:\1 \2/p /^TEL/ s/:(1[1-9])([2-5][0-9]{3})([0-9]{4})/:0 41 \1 \2 \3/p /^TEL/ s/:0(1[1-9])([2-5][0-9]{3})([0-9]{4})/:0 41 \1 \2 \3/p
The Following User Says Thank You to caveman For This Useful Post: | ||