Junos OS

Expand all | Collapse all

Help with show command output with match on asterisk

Jump to Best Answer
  • 1.  Help with show command output with match on asterisk

    Posted 06-24-2019 04:40

    Hi all

    Can I please ask if its possible to match output from operational show commands with all lines containing an asterisk followed by and open square bracket i.e. "*["

     

    show route table for example.

     

    1.1.1.1/32       *[BGP/170] 6d 20:19:37, localpref 100, from 2.2.2.2
                               [BGP/170] 6d 20:19:38, localpref 100, from 2.2.2.2
                               [BGP/170] 6d 20:19:38, localpref 100, from 2.2.2.2

    Thank you



  • 2.  RE: Help with show command output with match on asterisk

    Posted 06-24-2019 04:47

    Yes, Please use this command: show route | match "\*\["

     

     



  • 3.  RE: Help with show command output with match on asterisk

    Posted 06-24-2019 08:50

    Many thanks to both of you !



  • 4.  RE: Help with show command output with match on asterisk
    Best Answer

    Posted 06-24-2019 04:47

    "\*\["

    try that one, the backslash means that the next characzer is NOT treated as control character

     

    regards

     

    alexander