shell判断字符串包含

strA="helloworld"
strB="low"
if [[ $strA =~ $strB ]]
then
    echo "包含"
else
    echo "不包含"
fi
posted @ 2020-07-09 11:28  jiftle  阅读(246)  评论(1编辑  收藏  举报