/ Published in: Bash
URL: http://stackoverflow.com/questions/229551/string-contains-in-bash
Expand |
Embed | Plain Text
string='My string'; if [[ $string == *My* ]] then echo "It's there!"; fi
You need to login to post a comment.
aresnick on 11/05/08
2 people have marked this snippet as a favorite
URL: http://stackoverflow.com/questions/229551/string-contains-in-bash
string='My string'; if [[ $string == *My* ]] then echo "It's there!"; fi
You need to login to post a comment.