1234
string='My long string'if [[ $string == *"My long"* ]]; then echo "It's there!"fi
Ref: How to check if a string contains a substring in bash