Using Bash, I have a string = "My string". How can I test if it contains another string? For example:
You can use Marcus's answer (* wildcards) outside a case statement, too, if you use double brackets:
Note that spaces in the needle string need to be placed between double quotes, and the * wildcards should be outside the double quotes.