Okay I know we are not supposed to post asking for help on school assignments but this is just a project out of my book that i have to complete and the professor is never available he is a sudo prof. part timer. anyway i've got to create the follwing in the vi editor
echo -e "what would you like to do?
add an entry (a)
search and entry (s)
enter your choice (a/s)-->\c"
case $ANSWER in
a|A ) echo -e "Please enter the name... --> \c"
echo -e "Please enter relation... --> \c"
echo -e "Please enter phone number --> \c"
echo "$NAME\t$RELATION\t$PHONE" >> database
s|s ) echo "what word would you like to look for? --> \c"
grep "$WORD" database
*) echo "you must enter either the letter a or s."
my question is when i enter all this in and enter the ./myscript2 to run it
no matter what i enter i get a syntax error on the ) in the s|S ) also when entering this in the vi editor the first ) symbol turns orange and the latter stays white as if it's not recognizing it as a director. given the information and the "code" above what am i doing wrong it's written in the text book and i've followed it word for word and it still doesn't work i have emailed my prof but more than likely will not her from him till next week this is due in by the end of the day friday. someone please reply soon as I won't have internet at my house till tuesday next week and i'm at a friends house only for a short time tonight. major thanks in advance for any help.