Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A command to convert text files into Address Book vCards' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A command to convert text files into Address Book vCards
Authored by: webentourage on Sep 05, '03 03:56:00PM
All you have to do is use the awk code I've modified below, and add another tab field to the text file with the email address.

eg: name [tab] phone [tab] email

awk -F\t ' {print "BEGIN:VCARD"; print "VERSION:3.0"; print "N:"$1; print "EMAIL;type=WORK;type=pref:"$3; print"TEL;type=WORK;type=pref:"$2; print "END:VCARD" $4; print $4 }' infile.txt > newfile.vcf

[ Reply to This | # ]