shell字符与数组之间的判断
[[ 数组 =~ 字符 ]]
循环判断,匹配返回true
if ! [[ $allServer =~ $1 ]] && [ $1 != "all" ] ; then
echo "not find parameter : $1,parameter in $allServer or 'all' ";
return;
fi;
标签:字符,shell,判断,数组,allServer,parameter
From: https://www.cnblogs.com/lgxdev/p/17037828.html