View Single Post
Posts: 182 | Thanked: 40 times | Joined on Apr 2010 @ Seatle, WA
#9
Originally Posted by edanto View Post
thanks mehulrajput!

I'm having some trouble with the find/replace step - would you have a few minutes to help please?

I created the all.vcf file, and here's an excerpt. (I snipped the details obviously for privacy). As you can see I don't have a "END VCARDBEGIN VCARD" string, it's different in each case.


::::::::::::::
Abbey.vcf
::::::::::::::
BEGIN:VCARD
VERSION:3.0
UID:1397
REV:2010-05-31T13:44:15Z
TEL;TYPE=CELL,VOICE:+353 <snip>
FN:Abbey
N:Abbey;;;;
END:VCARD::::::::::::::
Adrian Lynch.vcf
::::::::::::::
BEGIN:VCARD
VERSION:3.0
UID:1398
REV:2010-05-31T13:44:15Z
TEL;TYPE=CELL,VOICE:+353<snip>
FN:Lynch\, Adrian
N:Lynch;Adrian;;;
END:VCARD::::::::::::::
Adrienne Mockler.vcf
::::::::::::::
BEGIN:VCARD
VERSION:3.0
UID:1399
REV:2010-05-31T13:44:15Z
TEL;TYPE=CELL,VOICE:+353<snip>
FN:Mockler\, Adrienne
N:Mockler;Adrienne;;;
END:VCARD

On top of that I don't have (and can't seem to figure out how to get) notepad++ for my ubuntu. I have gedit and the doing find-replace with /n/n only adds in '/n/n' as opposed to adding in a new line.

Any tips, please?
oh i sorry didn't realise you have ubuntu installed. it is much more easier in ubuntu :-)... so here you go..

create all.vcf using the following command. you will have to be in the directory where single vcf for each contact is kept.

cd <directory to where single vcf are kept>
more *.vcf > ../all.vcf
cd ..

now open vi editor

vi all.vcf

type the following command

:%s/END VCARDBEGIN VCARD/END VCARD\n\nBEGIN VCARD/g
:wq

and you are all set. sorry do not know how to do it through gedit as i more of a vi guy :-)
 

The Following User Says Thank You to mehulrajput For This Useful Post: