Comparaison partielle de la sous-chaîne Script Shell Shell
string='My long string'
if [[ $string == *"My long"* ]]; then
echo "It's there!"
fi
Smoggy Scarab
string='My long string'
if [[ $string == *"My long"* ]]; then
echo "It's there!"
fi