Shell: pesquise uma substring em outra string

# Search for a substring in another string using wildcard

string='My long string'
substr='My long'

# Note: the wildcard character (*) is outside the double qoute ("")
if [[ "$string" == *"$substr"* ]]; then
  echo "Found substring!"
fi
Famous Frog