Esetleg szigorúan Linux-only módon: ifconfig $(awk '$2~/00000000/ { print $1}' /proc/net/route) | awk '/inet\ / { split($2, a, ":"); print a[2]}'