判断是否包含指定的字符串

tr="this is a string"
if [[ $str =~ "taais" ]]; then
echo include
fi
echo no

原文地址:https://www.cnblogs.com/lili-work/p/6136624.html