bash trick: build-in method
A="abcd0123456789" if [ "${A/1234/}" != "$A" ] ; then echo yes fi
grep method
A="abcd0123456789" if echo $A | grep -q 1234 ; then echo yes fi
After I test, 1st method is 40 times faster then grep method