Hello,
I'd like know how to do a plain substring match in a shell script.
For example, if I have
STRING1="http://127.0.0.1/"
STRING2="http://127101011/"
SUBSTRING="127.0.0.1"
I want SUBSTRING to match STRING1 but not STRING2. It's like java.lang.String.indexOf(String).
I guess the problem can also be fixed by properly escaping the content of SUBSTRING, too, but I can't seem to figure out how to.
Thank you, wbkang