Hi,

show route summary Autonomous system number: 32934 Router ID: 100.100.100.100 inet.0: 498154 destinations, 3436699 routes (498150 active, 0 holddown +, 5 hidden) Restart Complete Direct: 15 routes, 14 active Local: 22 routes, 22 active BGP: 3426353 routes, 487808 active Static: 38 routes, 38 active IS-IS: 10268 routes, 10268 active RSVP: 3 routes, 0 active inet.3: 10103 destinations, 10107 routes (10103 active, 0 holddown, 0 +hidden) Restart Complete IS-IS: 10006 routes, 10002 active RSVP: 101 routes, 101 active iso.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden) Restart Complete Direct: 2 routes, 2 active mpls.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden) Restart Complete MPLS: 6 routes, 6 active inet6.0: 25299 destinations, 115803 routes (25299 active, 0 holddown, +0 hidden) Restart Complete Direct: 14 routes, 10 active Local: 23 routes, 23 active BGP: 115500 routes, 25000 active Static: 101 routes, 101 active IS-IS: 165 routes, 165 active

I need to capture only the active routes, 498150 , 10103 and 25299 from the above output. The test will be passed only if all the 3 matches are successful. Is there a way to do a pattern matching for this?


In reply to Capturing route details by Pavanai

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.