Browse Source

grep was bringing back multiple results

pull/1477/head
Daniel Gibbs 8 years ago
parent
commit
518e2d2da0
  1. 4
      linuxgsm.sh

4
linuxgsm.sh

@ -210,7 +210,7 @@ fn_install_menu() {
# Gets server info from serverlist.csv and puts in to array # Gets server info from serverlist.csv and puts in to array
fn_server_info(){ fn_server_info(){
IFS="," IFS=","
server_info_array=($(grep -a "${userinput}" "${serverlist}")) server_info_array=($(grep -w "${userinput}" "${serverlist}"))
shortname="${server_info_array[0]}" # csgo shortname="${server_info_array[0]}" # csgo
servername="${server_info_array[1]}" # csgoserver servername="${server_info_array[1]}" # csgoserver
gamename="${server_info_array[2]}" # Counter Strike: Global Offensive gamename="${server_info_array[2]}" # Counter Strike: Global Offensive
@ -297,6 +297,8 @@ if [ "${shortname}" == "core" ]; then
echo "Install canceled" echo "Install canceled"
else else
echo "[ FAIL ] menu result does not match servername" echo "[ FAIL ] menu result does not match servername"
echo "result: ${result}"
echo "servername: ${servername}"
fi fi
elif [ -n "${userinput}" ]; then elif [ -n "${userinput}" ]; then
fn_server_info fn_server_info

Loading…
Cancel
Save