Is there a command to get the ipaddress only of my system. ie; like hostname where i get my hostname i need the output dispay only my ipaddress. I am using a linux server.
Allthough it's not common for Unix systems, but a system could get it's IP from a DHCP server. There are even other options where the systems IP is not necessary in the /etc/hosts file.
So, consulting the host file is no guarantee for success.