OCD Much? Normalizing Your OS X Address Book

While working on another project that will be modifying my OS X Address Book, I happened to notice that all of my phone numbers were being output in a non-standard way on vCards. Rather than dealing with it in subsequent steps, I decided to resolve the issue at the source (in other words, my other project is allowed to be fragile because it is just for me). Solution?

#!/bin/sh
cp ~/Library/Application\ Support/AddressBook/AddressBook-v22.abcddb ~/Library/Application\ Support/AddressBook/AddressBook-v22.bak
sqlite3 ~/Library/Application\ Support/AddressBook/AddressBook-v22.abcddb "update ZABCDPHONENUMBER set ZFULLNUMBER = replace(replace(replace(replace(replace(ZFULLNUMBER, '(', ''), ')', ''), '-', ''), ' ', ''), '.', '');"

Simple enough. Enjoy!