Re: addressbook recommendations?
On Mon, May 17, 2004 at 03:20:47AM -0400, richard lyons wrote:
> Does anyone here have any recommenations for an addressbook? I'd like to
> replace kaddressbook (now that I'm not running kde). Something generic
> x-windows would be fine - or perhaps better a console-based one. If the data
> are in a portable format, so much the better. I find kaddressbook is
> cumbersome to load for a quick reference, and seems inclined to be cranky
> sometimes.
>
> TIA
For a console one:
Write all data in separate paragraphs, in "filewithdata", such as
Peter Pan
1-800-555-1212
Lives with Wendy, my former girlfriend.
2565 South Park Avenue
Atlanta, GA
Johnny one-eye
1-908-757-8661
blah blah
Then use the following sed script
#!/bin/bash
# taken from a collection of scripts
# print paragraph if it contains AAA (blank lines separate paragraphs)
# sed -e '/./{H;$!d;}' -e 'x;/AAA/!d;'
# To find someone's data, just type ./find "word"
# where "word" is a word you know is in the paragraph sought after
# The data base is a flat text file, with paragraphs separated by
# blank lines.
#sed -e '/./{H;$!d;}' -e 'x;/'$*'/!d;' ~/filewithdata;
# next line version is case insensitive
sed -e '/./{H;$!d;}' -e 'x;/'$*'/I!d;' ~/filewithdata;
echo " ";
exit 0;
>From a command line, just type ./scriptname pan
and it will spit all info you have about Peter.
HTH
Reply to: