May 2017
Beginner
552 pages
28h 47m
English
A text file database can be built with common shell tools.
To create an address list, create a file with one line per address and fields separated by a known character. In this case, the character is a tilde (~):
first last~Street~City, State~Country~Phone~
For instance:
Joe User~123 Example Street~AnyTown, District~1-123-123-1234~
Then add a function to find lines that match a pattern and translate each line into a human-friendly format:
function addr {
grep $1 $HOME/etc/addr.txt | sed 's/~/\n/g'
}
When in use, this would resemble the following:
$ addr Joe
Joe User
123 Example Street
AnyTown District
1-123-123-1234