I want to find substring in a string according to this solution.
But for some reason it doesn't work with variables:
str="abcd";substr="abc";if [[ "${substr}"* == ${str} ]]then echo "CONTAINS!";fi
Aucun commentaire:
Enregistrer un commentaire