You can use the grep command for that. For example
grep -q $USERINPUT textfile
This will search for the text in the variable $USERINPUT in the file textfile without printing the found matches (if any, option -q). grep will return an exit code of 0 if the text is found, otherwise it will return exit code 1.
For more info on grep use