02-05-2021 10:45 PM
Hey guys, I saw the following commands that can be used to filter output.
PC1#show run | ? append Append redirected output to URL (URLs supporting append operation only) begin Begin with the line that matches count Count number of lines which match regexp exclude Exclude lines that match format Format the output using the specified spec file include Include lines that match redirect Redirect output to URL section Filter a section of output tee Copy output to URL PC1#show run |
I want to know what is a "section"? I tried the following command:
PC1#show run | section int interface FastEthernet0/0 ip address 192.168.1.1 255.255.255.0 secondary ip address 171.4.4.4 255.255.0.0 secondary ip address 172.16.3.3 255.255.0.0 duplex auto speed auto interface FastEthernet0/1 no ip address duplex auto speed auto interface FastEthernet1/0 no ip address shutdown duplex auto speed auto interface FastEthernet1/1 no ip address shutdown duplex auto speed auto PC1#
It seems a section starts with a top level string and includes all following indented text. Is my understanding correct?
Solved! Go to Solution.
02-05-2021 11:47 PM
Hello,
exactly. A section is a functional subgroup of the configuration (e.g. interfaces, routing protocols, lines). The section will show you everything associated with that functional subgroup.
02-05-2021 11:47 PM
Hello,
exactly. A section is a functional subgroup of the configuration (e.g. interfaces, routing protocols, lines). The section will show you everything associated with that functional subgroup.
02-06-2021 01:17 PM
Hello
In layman terms
Instead of going though the all running configuration to get to the part of it you wish to see you can use the pipe command - “section” or “sec” to filter up to that part of it.
example :
sh run | sec line
sh run | sec ntp
sh run | sec router
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide