a=Chris Horn (CRAY)
i=Elena Gryaznova
i=Andrew Perepechko
fi
# Get the IP address of ${HOST_NAMES[i]} from its own ping
fi
# Get the IP address of ${HOST_NAMES[i]} from its own ping
- if is_pdsh; then
- ip_addr=`echo "${ret_str}" | head -1 | awk '{print $4}'`
- else
- ip_addr=`echo "${ret_str}" | head -1 | awk '{print $3}'`
- fi
+ ip_pattern="[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}"
+ ip_addr=`echo "${ret_str}" | egrep -o "${ip_pattern}"`
ip_addr=`echo "${ip_addr}" | sed -e 's/^(//' -e 's/)$//'`
# Compare IP addresses
ip_addr=`echo "${ip_addr}" | sed -e 's/^(//' -e 's/)$//'`
# Compare IP addresses