string="Hello, World!"
substring="World"
if [[ $string == *"$substring"* ]]; then
echo "字符串包含指定的子串"
else
echo "字符串不包含指定的子串"
fi
string="Hello, World!"
substring="World"
if [[ $string == *"$substring"* ]]; then
echo "字符串包含指定的子串"
else
echo "字符串不包含指定的子串"
fi