I am currently stuck on this piece of code for a long time now. Below is my code.
if grep -ixqF $bookName:$authorName BookDB.txt
then echo "Book found"
echo "Book not found"
Mary had a little nose:JamesPoppcock
Merry Christmas:Christ Sake
Kinky Asians:Walter Bedding
Quote the variable expansion portion:
grep -ixqF "$bookName:$authorName" BookDB.txt
Without quoting the expansion is suffering from word splitting (and glob expansion) and only the first word is taken as a pattern to search and the rest are being treated as file name(s) along with