瀏覽代碼

Modify awk to use cut in check_ip_overlap

This patch replaces awk with cut to workaround issues present with
running this script within ucp-dsinfo.

Signed-off-by: Kyle Squizzato <kyle.squizzato@docker.com>
Kyle Squizzato 7 年之前
父節點
當前提交
6b782b4b82
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      libnetwork/support.sh

+ 1 - 1
libnetwork/support.sh

@@ -26,7 +26,7 @@ function echo_and_run {
 
 function check_ip_overlap {
   inspect=$1
-  overlap=$(echo "$inspect_output" | grep "EndpointIP\|VIP" | awk -F ':' '{print $2}' | sort | uniq -c | grep -v "1 ")
+  overlap=$(echo "$inspect_output" | grep "EndpointIP\|VIP" | cut -d':' -f2 | sort | uniq -c | grep -v "1 ")
   if [ ! -z "$overlap" ]; then
     echo -e "\n\n*** OVERLAP on Network ${networkID} ***";
     echo -e "${overlap} \n\n"