I have tried to use a 'case' loop but it doesn't work for a reason unknown to me.
This is my script for the case loop.
echo "Do you wish to search again? [y/n]"
read INPUT_STRING2
case $INPUT_STRING2
y)
;;
*)
exit
;;
Then I am having issues trying to make my script more user friendly, I want my script to tell the user if the string isn't found but I can't figure it out. I have tried using a case loop instead but have had no luck, and tried to use an else statement but it didn't work.
if grep -q $STRING $FILE ; then
echo "string found"
fi
This part works but isn't all of what I want.