Skip to content

Instantly share code, notes, and snippets.

@terrettaz
Created October 17, 2009 16:19
Show Gist options
  • Save terrettaz/212386 to your computer and use it in GitHub Desktop.
Save terrettaz/212386 to your computer and use it in GitHub Desktop.
Just a simple way to extract email address from your Mac OS AddressBook
mdfind "(kMDItemContentType == com.apple.addressbook.person)" | sed -e 's| |\\ |g' | xargs mdls -name kMDItemEmailAddresses | grep -E '".*@.*"' | sed -e 's|.*"\(.*@.*\)"|\1|g' | sort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment