#!/bin/bash tmpfile=$(mktemp) destfile=$(mktemp) wget -q 'https://drive.yigitcolakoglu.com/remote.php/dav/addressbooks/users/yigitcolakoglu/contacts/?export' \ --user yigitcolakoglu \ --password "$(pass show Server/drive.yigitcolakoglu.com/yigitcolakoglu)" \ -O $tmpfile abook --convert \ --informat vcard \ --infile $tmpfile \ --outformat abook \ --outfile $destfile rm $tmpfile chmod 600 $destfile sed 's/([0-9]) ([0-9])/\1\2/g' $destfile mv $destfile "$XDG_DATA_HOME"/abook/addressbook