string='script test string';
if [[ $string == 'script test string' ]]
then
echo "0 It's there!";
fi
if [[ $string == *test* ]]
then
echo "1 It's there!";
fi
if [[ $string == *string ]]
then
echo "2 It's there!";
fi
if [[ $string == script* ]]
then
echo "3 It's there!";
fi
沒有留言:
張貼留言