Junos
Highlighted
Junos

Help with show command output with match on asterisk

‎06-24-2019 04:39 AM

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

Ajaz Nawaz
JNCIE-SEC#254 | CCIE#15721
JNCIA-FWV | JNCIS-FWV
JNCIA-JUNOS | JNCIS-SEC
JNCIP-SEC | JNCIE-SEC
CCNP-Collaboration
3 REPLIES 3
Highlighted
Junos
Solution
Accepted by topic author anawaz
‎06-24-2019 08:49 AM

Re: Help with show command output with match on asterisk

‎06-24-2019 04:46 AM

"\*\["

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

 

regards

 

alexander

Highlighted
Junos

Re: Help with show command output with match on asterisk

‎06-24-2019 04:47 AM

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

 

 

Thanks,
Nellikka
JNCIE x3 (SEC #321; SP #2839; ENT #790)
Please Mark My Solution Accepted if it Helped, Kudos are Appreciated too!!!
Highlighted
Junos

Re: Help with show command output with match on asterisk

‎06-24-2019 08:50 AM

Many thanks to both of you !

Ajaz Nawaz
JNCIE-SEC#254 | CCIE#15721
JNCIA-FWV | JNCIS-FWV
JNCIA-JUNOS | JNCIS-SEC
JNCIP-SEC | JNCIE-SEC
CCNP-Collaboration
Feedback