Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Capturing route details

by arkturuz (Curate)
on Nov 17, 2014 at 14:00 UTC ( #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
Node Status?
node history
Node Type: note [id://1107409]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2019-11-14 03:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (76 votes). Check out past polls.

    Notices?