LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   List IP addresses (https://www.linuxquestions.org/questions/linux-newbie-8/list-ip-addresses-347096/)

stefaandk 07-26-2005 07:02 PM

List IP addresses
 
Hi,

I'm looking for a command/syntax that lists IP address for me.

I'm familiar with ifconfig but the info provided is overly verbose for my requirements.

I just want to list IP's only, clean and simple.

Thx

btmiller 07-26-2005 07:45 PM

How about something like:

Code:

/sbin/ifconfig -a | grep 'inet addr' | awk '{print $2}' | cut -d: -f 2
Should list all IP addresses assigned to any interface(s) on your system.

stefaandk 07-26-2005 09:02 PM

You ripper! :)


All times are GMT -5. The time now is 09:30 PM.