I have a string in Bash:
string=\"My string\"
How can I test if it contains another string?
if [ $string ?? \'foo\' ]; then
How about this:
text=" bmnmn " if [[ "$text" =~ "" ]]; then echo "matched" else echo "not matched" fi