From 86a39284b5e58a415f3e3f34436e35533c030e4e Mon Sep 17 00:00:00 2001 From: Yiming Liu Date: Sun, 18 Sep 2016 10:35:17 +0800 Subject: [PATCH] KYLIN-1978: fix compatible issue on Ubuntu --- build/bin/get-properties.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/build/bin/get-properties.sh b/build/bin/get-properties.sh index a53de6b..516e8c9 100755 --- a/build/bin/get-properties.sh +++ b/build/bin/get-properties.sh @@ -23,11 +23,5 @@ then exit -1 fi -IFS=$'\n' -result= -for i in `cat ${KYLIN_HOME}/conf/kylin.properties | grep -w "^$1" | grep -v '^#' | awk -F= '{ n = index($0,"="); print substr($0,n+1)}' | cut -c 1-` -do - : - result=$i -done -echo $result \ No newline at end of file +result=`cat ${KYLIN_HOME}/conf/kylin.properties | grep -w "^$1" | grep -v '^#' | awk -F= '{ n = index($0,"="); print substr($0,n+1)}' | cut -c 1- |tail -1` +echo $result -- 2.7.4 (Apple Git-66)