2014年3月14日 星期五

String contains in Shell Script

string='My string';

if [[ $string == *My* ]]
then
  echo "It's there!";
fi

沒有留言:

張貼留言