Get IP´s

To get the adapters wit IPs use this:

/sbin/ifconfig | awk '/^[a-z]/{printf "%s ",$1} /inet A/ {gsub("Adresse:","",$2); print $2}'

Result:

eth0 192.168.1.2
lo 127.0.0.1
vmnet1 172.16.41.1
vmnet8 172.16.115.1

Leave a Reply

Your email address will not be published.

thirteen − eleven =