From a107eb6bf5c83fbb54030ea6224ebfb130a4ae9e Mon Sep 17 00:00:00 2001 From: lsy Date: Mon, 23 Sep 2024 15:03:35 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E5=86=99=E5=AE=89=E8=A3=85=E8=BD=AF?= =?UTF-8?q?=E4=BB=B6=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Menus/Software.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Menus/Software.sh b/Menus/Software.sh index 6b4d7bf..e39c8a4 100644 --- a/Menus/Software.sh +++ b/Menus/Software.sh @@ -47,7 +47,9 @@ done read -p "请输入需要安装的软件序号,用 空格 隔开:" pick -if [[ ! $pick =~ [1-"${#soft_dick[@]}"\ ] ]];then +if [[ -z $pick ]];then + exit +elif [[ ! $pick =~ [1-"${#soft_dick[@]}"\ ] ]];then echo "输入错误" exit fi