When we want to check some linux command output if contains some phrasse, or words, it can be done by adding the command output into variable like this:

Code:
varname=$(thecommandhere)
then we check if varname is equal to *example*:

Code:
 [[ $varname == *example* ]] && echo "Found"
Code:
$ [[ $varname == *example* ]] && echo Found || echo Not found
Found
Maybe better way if the match is phrasse with spaces is adding this phrasse into its own variable, not directly into "If"

Code:
varname='My long string';
if [[ "$varname" == *My* ]];then
echo "It's there!";
fi

varname2=''m long"
if [[ "$varname" == *"$varname2"* ]]; then
echo "The '$varname' contains phrasse '$varname2'"
fi