I am trying to replace this command:
HOST_IP_ADDRESS=$(/sbin/ifconfig | grep inet | grep -v 127.0.0.1 | awk '{print $2}' | cut -d)
in my multipile script file in a single try. I greped the output through
grep -R 'HOST_IP_ADDRESS' ./ -R | grep "127.0.0.1" | awk -F ":" '{print $2}'
I want to replace the result with HOST_IP_ADDRESS=hostname -i
instead of
HOST_IP_ADDRESS=$(/sbin/ifconfig | grep inet | grep -v 127.0.0.1 | awk '{print $2}' | cut -d
is their any way do this through sed command.