would look up Pizza in pat's phone book, no matter who is running rolo. The program can find pat's phone book by looking at .rolo in pat's home directory.
Add the -u flag to rolo to allow you to look up someone in another user's phone book (provided that you have read access to it). For example:
$ rolo -u pat Pizza
This is another straightforward task, particularly given that a user's home directory can be specified with the shorthand ~username. Here's the mod:
if [ "$1" = "-u" ] ; then
if [ ! -s "~$2/.rolo" ] ; then
echo "Error: user $2 doesn't have a .rolo file or it's not readable."
exit 1
fi
PHONEBOOK="$(cat ~$2/.rolo)"
shift 2 # get rid of the -u and the username
elif [ -s $HOME/.rolo ] ; then
PHONEBOOK=$(cat $HOME/.rolo)
else
: ${PHONEBOOK:=$HOME/phonebook}
fi
You might also like to view...
A remote user cannot connect to the office via VPN. The user has established Internet connectivity. Which of the following is the MOST likely next step in troubleshooting?
A. Reinstall the VPN client at the remote computer. B. Determine if the VPN service is running at the office. C. Power cycle the VPN concentrator at the office. D. Determine if the user has the correct VPN address and password
When defining a ____________ server, it is possible to override the integrated authentication with a stored username and password.
Fill in the blank(s) with the appropriate word(s).