if grep -q "$STRING" "$FILE" ; then echo 'the string exists' ; else echo 'the string does not exist' ; fi
References
https://unix.stackexchange.com/questions/530561/shell-script-check-if-a-file-contains-a-specific-line-string
https://stackoverflow.com/questions/10552711/how-to-make-if-not-true-condition