Under Solaris 9 and 10, use the following to get
the IP address from ifconfig. Additionally, the sed
command cuts off the loopback device.
# ifconfig -a | nawk '/inet/{print $2}'|sed '/127.0.0.1/d' NOTE: All tips provided are USE AT YOUR OWN RISK. Tips are submitted
by various unix admins around the globe. UGU suggest you read and
test each tip in a non-volitile environment before placing into
production.