From 13ded550d773dba766b305ea8df0489bcca493d7 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 11 Jun 2023 15:05:29 +0100 Subject: [PATCH] feat: update serverlist menu The script now skips the first line of the serverlist file when generating the list for 'list' and 'install' commands. This ensures that the header is not included in the output. --- linuxgsm.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index d8a28d604..b5786e70d 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -347,11 +347,11 @@ if [ "${shortname}" == "core" ]; then if [ "${userinput}" == "list" ] || [ "${userinput}" == "l" ]; then { - tail -n +1 "${serverlist}" | awk -F "," '{print $2 "\t" $3}' + tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}' } | column -s $'\t' -t | more exit elif [ "${userinput}" == "install" ] || [ "${userinput}" == "i" ]; then - tail -n +1 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}" + tail -n +2 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}" fn_install_menu result "LinuxGSM" "Select game server to install." "${serverlistmenu}" userinput="${result}" fn_server_info