From 651d853ef30da2621ea6304809f4d5d875cbc18a Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Mon, 3 Jun 2019 11:42:26 -0400 Subject: [PATCH] Need -e option for echo to print newline --- xCAT-test/autotest/testcase/genesis/test.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xCAT-test/autotest/testcase/genesis/test.sh b/xCAT-test/autotest/testcase/genesis/test.sh index 7fabd6842..242f1d141 100755 --- a/xCAT-test/autotest/testcase/genesis/test.sh +++ b/xCAT-test/autotest/testcase/genesis/test.sh @@ -6,11 +6,11 @@ function runcmd(){ result=`$*` if [[ $? -eq 0 ]];then echo $result; - echo "Run command $*....[Succeed]\n"; + echo -e "Run command $*....[Succeed]\n"; return 0; else echo $result; - echo "Run command $*... [Failed]\n"; + echo -e "Run command $*... [Failed]\n"; return 1; fi } @@ -23,7 +23,7 @@ masternet=`ifconfig | awk "BEGIN{RS=\"\"}/\<$masterip\>/{print \$1}"|head -n 1 net2=`netstat -i -a|grep -v Kernel|grep -v Iface |grep -v lo|grep -v $masternet|head -n 1|awk '{print $1}'`; net2ip=""; if [[ -z $net2 ]];then - echo "There is no second network,could not verify the test" + echo "There is no second network, could not verify the test" return 1; else net2ipstring=`ifconfig $net2 |grep inet|grep -v inet6`; @@ -35,7 +35,7 @@ net2ip=""; else net2ip=0.0.0.0; fi - echo "The original net2 ip is $net2ip" + echo "The original net2 IP is $net2ip" cmd="ifconfig $net2 60.3.3.3"; runcmd $cmd; cmd="makenetworks";