Title=
echo -n "Title: "
read Title
echo -n "Author:"
read Author
validation=`grep -i "$Title" fruit | grep -i "$Author" | awk -F":" '{ print $1}'`
if [ "$Title" = "$validation" ] ; then
clear
echo "Error! Book Already Exist"
else
echo "You may input a new book in/
hey guys, im doing a simple search program and i came up with a problem. What i am trying to achieve is, if the search is false(means the book does exist) , the program will then ask the user to input the information again(title and author) and do a search again until there is no such book and then display a message saying he can input a new book in.
i tried using a until loop, but it does not seem to work. some guidance on how the statement should be and where should it be placed?