修复软件安装正则问题
This commit is contained in:
parent
3f34cf7561
commit
dcd32d33d9
@ -47,6 +47,7 @@ done
|
|||||||
echo "请输入需要安装的软件序号(默认安装全部)"
|
echo "请输入需要安装的软件序号(默认安装全部)"
|
||||||
read -p "用 空格 隔开:" pick
|
read -p "用 空格 隔开:" pick
|
||||||
|
|
||||||
|
pick="$pick "
|
||||||
|
|
||||||
if [[ -z $pick ]];then
|
if [[ -z $pick ]];then
|
||||||
for (( i = 1; i <= ${#soft_dick[@]}; i++ )); do
|
for (( i = 1; i <= ${#soft_dick[@]}; i++ )); do
|
||||||
@ -56,7 +57,7 @@ if [[ -z $pick ]];then
|
|||||||
pick="$i"
|
pick="$i"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
elif [[ $pick =~ [^1-${#soft_dick[@]}\s] ]];then
|
elif ! [[ $pick =~ [1-${#soft_dick[@]}?=\s]+ ]];then
|
||||||
echo "输入错误"
|
echo "输入错误"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user