I am trying to understand a program in a book and this program suppose to call other programs which are in the same folder, the other programs are called 'lu' and 'add' but for some reason when it gets to the last line of each case to call these programs there is an error message saying
./rolo: line 29: lu: command not found OR
./rolo: line 29: add: command not found
and the lu program looks like this:
#!/bin/bash
#
# Look someone up in the phone book
#
grep "$1" phonebook
echo '
would you like to:
1. Look someone up
2. Add someone to the phone book
3. Remove someone from the phone book
Please select one of the above (1 - 3): \c'
#
# Read and process selection
#
read choice
echo
case "$choice"
in
1) echo "Enter name to look up: \c"
read name
lu "$name";;
2) echo "Enter name to be added: \c"
read name
echo "Enter number: \c"
read number
add "$name" "$number";;
*) echo "Bad choice";;
esac
I don't understand why is not calling them. Please any help is appreciated. Thank you.