#!/bin/bash
# Export the abook addressbook to a multitude of formats
# Published as per GNU LGPL 3; 2011-09-28 21:07:13+00:00
# by celeste:crystalfaery <angela@crystalfaeries.net>
# http://www.crystalfaeries.net/linux/bin/addressbook_export
for t in csv html ldif text ;do
	rm $HOME/contacts/addressbook."$t"
	abook --convert --infile $HOME/.abook/addressbook --outformat $t --outfile $HOME/contacts/addressbook."$t"
done

	rm										$HOME/.mutt/aliases
	abook --convert --infile $HOME/.abook/addressbook --outformat mutt --outfile	$HOME/.mutt/aliases

rm					$HOME/contacts/addressbook.abook
cp	$HOME/.abook/addressbook	$HOME/contacts/addressbook.abook


syntax highlighted by Code2HTML, v. 0.9.1