A while back, I started working on a utility to access the AddressBook database from the command line. I had a prototype, but had since stopped working on it. This related hint encouraged me to finish it up and release it. So, here it is: Contacts. Here's a sample of its output:
$ contacts NAME PHONE IM EMAIL Kim Jong Il +82-(001)385 License2KimJongill mrill@... George W Bush 202-276-4300 Bush43 big.dubya@... [...][robg adds:I trimmed the email addresses to narrow the width a bit, but they do appear in full in the program's output. This program is also posted in the comments to the first article, but I felt that it was enough of an improvement in the methodology that it was worth posting on its own. The program includes, hopefully obviously, a means of searching for entries as well as simply displaying the Address Book's contents.]
Mac OS X Hints
http://hints.macworld.com/article.php?story=20030611142259416