diff --git a/Menus/Software.sh b/Menus/Software.sh index 497724f..461a5a6 100644 --- a/Menus/Software.sh +++ b/Menus/Software.sh @@ -55,9 +55,14 @@ if [[ -z $pick ]];then pick="$i" fi done -elif ! [[ $pick =~ [1-${#soft_dick[@]}|\s]+ ]];then - echo "输入错误" - exit +else + for i in $path ; do + if ! [[ $i =~ [1-${#soft_dick[@]}] ]];then + echo "输入错误" + exit + fi + done + fi for i in $pick ; do