How to Find out the IP address assigned to eth0 and display IP only
Q. I need to get the IP address assigned to eth0 Linux interface. How do I find out IP address only? I don’t want other information displayed by Linux ifconfig command.
A. For shell script or may be for other cause you may need the IP address only. You can use ifconfig command with grep and other filters.
See on www.cyberciti.biz