Software >> OS >> Unix >> Solaris >> How to obtain list of ip addresses configured from ifconfig

 

ifconfig -a | sed -e 's/^.*inet//'  | sed -e 's/ netmask.*$//' | sed -e 's/ flags.*$//'

 

sample output

lo0:
 127.0.0.1
ce0:
 192.168.0.1