I need to loop over the network interfaces available in Linux. I'm interested in all kinds of interfaces (loopback, ethernet, vlan, bridge) - whatever shows up in ifconfig -a.
Is there a way to enumerate the interfaces in Linux? By any command or by reading a file?