#!/bin/sh
#
# shell script to search phone-book entries for the
# search string given on the command line
# requires sed and grep

SEARCH_STRING=$1
NUM_LINES=6

grep -h -i -$NUM_LINES $SEARCH_STRING ~/phone-book/letter-?.tex |
sed -e '
s/\\tel/tel: /g
s/\\wrk/work: /g
s/\\work/work: /g
s/\\home/home: /g
s/\\fax/fax: /g
s/[{}]//g
s/\\[a-z]*//g
'
