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...
Which of the following indicates your location in the folder structure?
A) Taskbar B) Menu Bar C) Content pane D) Address Bar
With a dynamic disk, you can create an almost unlimited number of volumes
Indicate whether the statement is true or false