shell判断字符串包含

strA="helloworld"
strB="low"
if [[ $strA =~ $strB ]]
then
    echo "包含"
else
    echo "不包含"
fi
原文地址:https://www.cnblogs.com/jiftle/p/13272652.html