From 387392707f60959c74ab21915b97d784eecf4e5f Mon Sep 17 00:00:00 2001 From: Bin Xu Date: Fri, 8 Sep 2017 14:19:34 +0800 Subject: [PATCH] Remove the mess info '' from the content when call getcredentials.awk (#3881) --- xCAT/postscripts/getcredentials.awk | 4 +++- xCAT/postscripts/getpostscript.awk | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/xCAT/postscripts/getcredentials.awk b/xCAT/postscripts/getcredentials.awk index 0701204fa..a471631d7 100755 --- a/xCAT/postscripts/getcredentials.awk +++ b/xCAT/postscripts/getcredentials.awk @@ -16,7 +16,9 @@ BEGIN { print "" |& server while (server |& getline) { - print $0 + if (match($0,"") == 0) { + print $0 + } if (match($0,"")) { quit = "yes" } diff --git a/xCAT/postscripts/getpostscript.awk b/xCAT/postscripts/getpostscript.awk index 99725d4a4..b4ae4e633 100755 --- a/xCAT/postscripts/getpostscript.awk +++ b/xCAT/postscripts/getpostscript.awk @@ -22,7 +22,9 @@ BEGIN { start = 1 } if (start == 1) { - print $0 + if (match($0,"") == 0) { + print $0 + } } if (match($0,"")) { @@ -31,6 +33,6 @@ BEGIN { if (match($0,"") && match(quit,"yes")) { close(server) exit - } + } } }