cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
689
Views
5
Helpful
2
Replies

What is a "section"?

 

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?

 

 

 

 

 

 

1 Accepted Solution

Accepted Solutions

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.

View solution in original post

2 Replies 2

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.

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


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul
Review Cisco Networking for a $25 gift card