Merge pull request #2130 from squizzi/patch_awk-to-cut

Modify awk to use cut in check_ip_overlap
This commit is contained in:
Flavio Crisciani 2018-03-27 15:26:07 -07:00 committed by GitHub
commit 2471f58c61

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"