[j-nsp] How to see contatining section ?

Per Granath per.granath at gcc.com.cy
Thu Sep 20 08:40:09 EDT 2012


I would typically do:

show | display set | match super-user

Which would give you:

set system login user marge class super-user

Then I would copy/paste part of that line, and do:

show system login user marge


Perhaps there's a smarter way, or perhaps someone has written an op-script for it....
BTW, the '| display set' is typed with 3 keys only '|ds', and command completion does the rest...


> -----Original Message-----
> From: juniper-nsp-bounces at puck.nether.net [mailto:juniper-nsp-
> bounces at puck.nether.net] On Behalf Of Bala Subrahmanyam Venkata
> Sent: Thursday, September 20, 2012 3:21 PM
> To: juniper-nsp at puck.nether.net
> Subject: [j-nsp] How to see contatining section ?
> 
> Novice Junos CLI query:
> 
> How can I find a section of config given a line which is 'inside' the section. For
> instance given the following
> 
> 
> user marge {
>             uid 2012;
>             class super-user;
>             authentication {
>                 encrypted-password
> "$1$Q5wrLnUs$zwwewew30U6/O1sWMP0yziY.ysh1"; ## SECRET-DATA
>             }
>         }
> 
> I'd like to do something like the below but see the whole "user" section.
> Here "find" finds the line and prints all after it. Is there somethign like "find
> and print containing section" ?
> 
> 
> test# show | find super-user
>             class super-user;
>             authentication {
>                 encrypted-password
> "$1$Q5wrLnUs$zwwewew30U6/O1sWMP0yziY.ysh1"; ## SECRET-DATA
>             }
>         }
> _______________________________________________
> juniper-nsp mailing list juniper-nsp at puck.nether.net
> https://puck.nether.net/mailman/listinfo/juniper-nsp



More information about the juniper-nsp mailing list