Thanks all. Looks like "display set" is the closest to what I wanted. Would be nice if JunOS has a
show config | match <pattern> | display *container* On Thu, Sep 20, 2012 at 7:00 PM, Atif Saleem <[email protected]>wrote: > Just my 2cents. You can also do the following. > > show configuration | match super-user | display inheritance | except ## > > or > > show configuration | match super-user | display set > > or just > > > show configuration | match "user marge" | display set > > show configuration | match "user marge" | display inheritance | except ## > > Best > > On Thu, Sep 20, 2012 at 5:40 PM, Per Granath <[email protected]> > wrote: > > 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: [email protected] [mailto:juniper-nsp- > >> [email protected]] On Behalf Of Bala Subrahmanyam Venkata > >> Sent: Thursday, September 20, 2012 3:21 PM > >> To: [email protected] > >> 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 [email protected] > >> https://puck.nether.net/mailman/listinfo/juniper-nsp > > > > _______________________________________________ > > juniper-nsp mailing list [email protected] > > https://puck.nether.net/mailman/listinfo/juniper-nsp > > > > -- > Atif > _______________________________________________ juniper-nsp mailing list [email protected] https://puck.nether.net/mailman/listinfo/juniper-nsp

