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>
This commit is contained in:
Kyle Squizzato 2018-03-27 14:39:40 -07:00
parent 02c404b4dd
commit 6b782b4b82

View file

@ -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"