Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Capturing route details

by arkturuz (Curate)
on Nov 17, 2014 at 14:00 UTC ( [id://1107409]=note: print w/replies, xml ) Need Help??


in reply to Capturing route details

Hello!

First thing: your post is unreadable. Try putting <code></code> tags around the route summary text. The other thing: post your solution to this and let us review it. It's not fair if we're doing all the work :)

You can match the desired text in many different ways as long as they're unique for the data lines you want matched. A simple regexp can match these active lines:

while (defined(my $line = <STDIN>)) { if ($line =~ /^inet\((\d+) active/) { print $line; } }

Output:

inet.0: 498154 destinations, 3436699 routes (498150 active, 0 holddown +, 5 hidden) inet.3: 10103 destinations, 10107 routes (10103 active, 0 holddown, 0 +hidden) inet6.0: 25299 destinations, 115803 routes (25299 active, 0 holddown, +0 hidden)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1107409]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (None)
    As of 2024-04-19 00:10 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found