To isolate just the assigned IP address on a machine, you could do something like this:
ifconfig | grep "inet\b" | grep -v '127.0.' | sed 's/inet \([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\) .*$/\1/'
Although if you have more than one active IP address, e.g., if you have a...