<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Apr 14, 2016 at 10:57 AM Reindl Harald <<a href="mailto:h.reindl@thelounge.net">h.reindl@thelounge.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
Am 13.04.2016 um 18:51 schrieb Sam Tresler:<br>
> I didn't make it through the rest of your post, but thought I'd chime in<br>
> with `ifconfig` has been deprecated since 2009.<br>
><br>
> 2009. I don't get deep into the distros, but I really wish they'd stop<br>
> shipping it.<br>
><br>
> `man ip` should give you info on the right tool you need to retrieve<br>
> your network info. From there it is just some pipework to get a list you<br>
> can iterate over.<br>
><br>
> $ ip -o a | awk '{print $2}' | uniq<br>
<br>
blub - gives a (incomplete) list of the current interfaces - so what is<br>
the advantage you wnated to demonstrate?<br>
<br></blockquote><div>wrong</div><div>that gives you *configured IP addresses* on interfaces. if there are interfaces without addresses obviously they wont be listed ...</div><div><br></div><div>for list of interfaces command is </div><div>ip [-o] l[ink] [show]</div><div><br></div><div>and I would point out that output of ifconfig wont give you complete list of interfaces as opposed to ip link show</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[root@rh:~]$ ip -o a | awk '{print $2}' | uniq<br>
lo<br>
vmnet8<br>
br-lan<br>
<br>
[root@rh:~]$ ifconfig | grep mtu<br>
bond0: flags=5187<UP,BROADCAST,RUNNING,MASTER,MULTICAST> mtu 1472<br>
br-lan: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1472<br>
eth0: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST> mtu 1472<br>
eth1: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST> mtu 1472<br>
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536<br>
vmnet8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500<br>
<br><br>
</blockquote></div></div>