#perl -e open(IP,"ip addr list |"); print "IF\tIP\n";while (<IP>) { print $2,"\t",$1,"\n" if /inet\s+([.\d]+).*\s([^\s]+)$/; }; close(IP);