Created
December 15, 2015 03:17
-
-
Save jybaek/f4189cbe4ee1a084f6e3 to your computer and use it in GitHub Desktop.
string compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
AA="My name is oops" | |
BB="name" | |
if [[ "$AA" == *"name"* ]];then | |
echo "1st find it" | |
fi | |
if [[ "$AA" =~ "name" ]];then | |
echo "2nd find it" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment