Help for this page

Select Code to Download


  1. or download this
    [root]# uname -s
    Linux
    ...
              TX packets:56540745 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:2665326103 (2541.8 Mb)  TX bytes:2665326103 (2541.8
    + Mb)
    
  2. or download this
    for my $chunk (split "\n\n", $data) {
        my ($if) = $chunk =~ m/^(\S+)/;
        my ($status) = $chunk =~ m/status:\s*(\S+)/;
        print "$if: $status\n";
    }