From 78e11207eacf8d59a6e5560a3a9442ddd54a51ce Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Oct 03 2012 19:36:25 +0000 Subject: Update `Functions/Commons/cli_getConfigValue.sh' file. --- diff --git a/Scripts/Bash/Functions/Commons/cli_getConfigValue.sh b/Scripts/Bash/Functions/Commons/cli_getConfigValue.sh index c559f6c..958d2cf 100755 --- a/Scripts/Bash/Functions/Commons/cli_getConfigValue.sh +++ b/Scripts/Bash/Functions/Commons/cli_getConfigValue.sh @@ -44,8 +44,8 @@ function cli_getConfigValue { # Parse configuration lines to retrive the values of variable # names. local CONFIG_VALUE=$(echo $CONFIG_LINES \ - | cut -d'=' -f2- \ - | sed -r 's/^"(.*)"$/\1/') + | gawk 'BEGIN{FS="="}; { print $2 }' \ + | sed -r -e 's![[:space:]]*!!g' -e 's!^"(.+)"$!\1!') # Output values related to variable name. echo "$CONFIG_VALUE"