Subject: Re: address database recommendation
To: None <netbsd-users@netbsd.org>
From: Ben <ben@cowlove.com>
List: netbsd-users
Date: 07/02/1999 23:11:02
>>>>> "Bill" == Bill Sommerfeld <sommerfeld@orchard.arlington.ma.us> writes:
>>>>> "Dan" == Dan McMahill <mcmahill@mtl.mit.edu> writes:
Dan> anyone have a recommendation for a database program for
Dan> storing addresses and telephone numbers? I'm interested in
Dan> storing a few hundred entries and then being able to look up
Dan> by various methods (name, company, keywords, et cetera.)
Bill> If you use emacs, try the "Big Brother Database", bbdb (I
Bill> should put a recent version of it into pkgsrc); among other
Bill> things, it insinuates itself into your mail reader and
Bill> tracks email addresss.
I second the recommendation for the bbdb (although it does have some
odd quirks). It's one of the reasons to use Emacs to read your e-mail.
However, if I had a phonebook with a few hundred entries (<¼ megabyte)
I would seriously consider not using *any* database program. Unix's
grep tool is powerful enough that you could create a text file like
this:
NAME: Jane Goodall
COMPANY: Primate Research Ctr
ADDR1: 2002 Bonobo Lane
ADDR2: Seattle, WA 98105
PHONE: (206) GOR-ILLA
KEY: Good haircut. Likes blue umbrellas.
NAME: Bob Jamieson
COMPANY: Badass Motorcycling Unixheads, Inc
ADDR1: 0777 E. Marginalia Blvd
ADDR2: Seattle, WA 98116
PHONE: (206) 867-5309
KEY: No sushi on Mondays.
And then read it like this:
% grep -p Jane filename
Usage: grep [-E|-F][-c|-l|-q][-xhbnsviyC] -e pattern_list [-f pattern_file] [file ...]
Oops. Never mind me. NetBSD doesn't support the -p (paragraph) option
that Digital hacked up. I guess you'd have to pull out some other
gizmos from the Unix toolbox:
% sed 's/^$/^M/' < filename | awk 'BEGIN {RS="\r"}; /Bonobo/ {print}'
NAME: Jane Goodall
COMPANY: Primate Research Ctr
ADDR1: 2002 Bonobo Lane
ADDR2: Seattle, WA 98105
PHONE: (206) GOR-ILLA
KEY: Good haircut. Likes blue umbrellas.
(That's a control-M up there). A little bit harder to type, but you
can always make a one-line shell script or alias out of it. Also, it
shouldn't be hard to read such a file in to a real database should the
need arise.
--Ben