From 18104545a018caf9789f3fea019a9825473c6dbe Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sat, 27 Aug 2016 16:42:55 +0200 Subject: [PATCH] Fixes removed spaces for Arma servername #1033 Feel the power of awk over sed ! Fixes #1033 --- lgsm/functions/info_config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 571e02f5e..c6cbddace 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -152,7 +152,7 @@ fn_info_config_realvirtuality(){ serverpassword="${unavailable}" slots="${zero}" else - servername=$(grep "hostname" "${servercfgfullpath}" | grep -v "//" | sed 's/\//g' | tr -d '=\"; ') + servername=$(grep "hostname" "${servercfgfullpath}" | grep -v "//" | awk -F '"' '{print $2}') adminpassword=$(grep "passwordAdmin" "${servercfgfullpath}" | grep -v "//" | sed 's/\passwordAdmin//g' | tr -d '=\"; ') serverpassword=$(grep "password =" "${servercfgfullpath}" | grep -v "//" | sed 's/\password//g' | tr -d '=\"; ') slots=$(grep "maxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')