linuxtool/Menus/Other.sh

18 lines
549 B
Bash
Raw Normal View History

2024-09-23 01:23:05 +08:00
declare path_script=$1
declare file_name=$(basename $0 .sh)
2024-07-25 21:59:46 +08:00
echo "========Other========"
declare print_number=0
declare -a print_arr
declare pick
for i in "${path_script}/Config/${file_name}"/* ; do
print_number=$(( print_number+1 ))
print_arr[$print_number]=$(basename $i .sh)
echo "${print_number}.${print_arr[$print_number]}"
done
2024-07-25 21:59:46 +08:00
echo "输入其他任意返回主页"
echo "========Other========"
read -p "请输入:" pick
if [[ $pick =~ [1-$print_number] ]]; then
bash "${path_script}/Config/${file_name}/${print_arr[$pick]}.sh"
fi