in reply to Status of all interfaces
Hello,
On my system...
#!/usr/bin/perl use strict; my @if_lines = `ifconfig`; foreach (@if_lines) { #you could remove interfaces with next if /^stf/; #this says if the line starts with stf, skip it. next unless (/up/i); #this says only print if the line has up (ign +ore case). print; }
This would just show up interfaces.
You get the idea. You could put the system command into an array.
Then filter in or out what you want to see...
You can play with this idea. (Good project for yourself.)
Good luck, Rob
|
|---|