script or cmd to retun my ip address....
I need a command or script to return my ip address by interface. I know u can see what it is by ifconfig, but I need just the ip address returned to dump in say...an environment variable, that i can later reference in a script. I tried "hostname -i" but it just returns the loopback address. I need to be able to get ip address for say eth0 or eth1. This would be on a redhat 9.0 box.