will result in john getting an email containing the result of a lookup for Susan in the phonebook.
Add a -m command-line option to rolo to make it easy to look up someone and have the result emailed to the specified recipient. So
rolo -m john Susan
will result in john getting an email containing the result of a lookup for Susan in the phonebook.
This is most easily done by adding the following block of code (or its equivalent) immediately after the test for the existence of the PHONEBOOK at the top of rolo:
# if the user specifies -m addr then email the result of the lookup to
# the specified recipient
if [ "$1" = "-m" ] ; then
recipient="$2"
shift 2
if [ -z "$recipient" ] ; then
echo "Error: -m requires an email recipient address"
exit 1
fi
$lu "$@" | mail -s "rolo output" $recipient
exit 0
fi
You might also like to view...
A(n) drop-down list box displays only one item in a selection list.
Answer the following statement true (T) or false (F)
To create a query based on two tables, the two tables must share a common ________
Fill in the blank(s) with correct word
Which of the following is a rule of referential integrity??
A. ?A record can be added to a related table even if a matching record exists in the primary table. B. ?The value of the primary key in the primary table cannot be changed if matching records exist in a related table. C. ?A record in the primary table can be deleted if matching records exist in the related table. D. ?The Cascade Delete Related Records option cannot be used to delete records in the primary table as well as in a related table.
What is multiplexing, and where is it used?
What will be an ideal response?