diff --git a/Menus/Software.sh b/Menus/Software.sh index 80bf021..f6ba506 100644 --- a/Menus/Software.sh +++ b/Menus/Software.sh @@ -47,6 +47,7 @@ done echo "请输入需要安装的软件序号(默认安装全部)" read -p "用 空格 隔开:" pick + if [[ -z $pick ]];then for (( i = 1; i <= ${#soft_dick[@]}; i++ )); do if [[ $i != 1 ]]; then @@ -55,7 +56,7 @@ if [[ -z $pick ]];then pick="$i" fi done -elif ! [[ $pick =~ [1-${#soft_dick[@]}\s]+ ]];then +elif [[ $pick =~ [^1-${#soft_dick[@]}\s] ]];then echo "输入错误" exit fi