Pipe character in IOS

IOS supports the use of the pipe character (represented with the | character) to filter the output of the show commands. The pipe function takes the output of the command and sends it to another function, such as begin or include. This way, you can filter the output to find the section of the output that interests you. Here are a couple of examples:

begin function

In the picture above you can see that we’ve entered the show running-config | begin interface command. This command starts the output from the first occurence of the word interface.

Another example, this time with include:

include function

As you can see from the example above, the include function displays only lines that include the word password.

To display only the section of the output about a certain feature, use the section function:

section function

You can see in the example above that the command displayed only the vty section of the running configuration.

Cisco Packet Tracer doesn’t support the pipe function. The examples above were created in GNS3.