@ -5,7 +5,6 @@ CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source " $CURRENT_DIR /helpers.sh "
source " $CURRENT_DIR /helpers.sh "
ip_address = " $( $CURRENT_DIR /ip_address.sh) "
ip_address = " $( $CURRENT_DIR /ip_address.sh) "
ip_address_interpolation_string = "\#{ip_address}"
do_interpolation( ) {
do_interpolation( ) {
local string = " $1 "
local string = " $1 "
@ -15,7 +14,7 @@ do_interpolation() {
ip_addr = "Offline"
ip_addr = "Offline"
fi
fi
local interpolated = " $( echo $1 | sed " s/ $ip_address_interpolation_string /$ip_addr /g " ) "
local interpolated = " $( echo $1 | sed " s/\(Offline\|[[:digit:]]\{1,3\}\.[[:digit:]]\{1,3\}\.[[:digit:]]\{1,3\}\.[[:digit:]]\{1,3\}\) / $ip_addr /g " ) "
echo " $interpolated "
echo " $interpolated "
}
}