Last active
December 19, 2015 17:49
-
-
Save khurshid-alam/5994613 to your computer and use it in GitHub Desktop.
Save Evolution-Contacts as separate vcf with file-names as contact-names
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# require syncevolution | |
# on ubuntu run following commands | |
# sudo add-apt-repository deb http://downloads.syncevolution.org/apt stable main | |
# sudo apt-get update | |
# sudo apt-get install syncevolution-evolution | |
# askubuntu question: http://askubuntu.com/questions/265083/how-to-export-save-evolution-contacts-as-seperate-vcf-files | |
mkdir ~/Desktop/allcontacts/ | |
cd ~/Desktop/allcontacts/ | |
syncevolution --print-items backend=evolution-contacts database=Personal >database | |
cat database | while read line | |
do | |
passid=`echo $line | awk -F: '{print $1}'` | |
name=`echo $line | awk -F\ '{print $2"-"$NF}'` | |
syncevolution --export allcontacts/"$name".vcf backend=evolution-contacts database=Personal --luids "$passid" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment