GREP with CLI show command

You can use Global Regular Expression Print (GREP) with show commands to filter the output based on match criteria.

Enter the show command followed by the pipe (|) character, followed by the GREP filter command. The show command output contains only the lines that match the GREP filter pattern.

Note

Note

The show fulltech command does not support GREP filters.

The following GREP filter commands are supported.

GREP filter function

Description

begin

Displays the output of a command starting from the first line, which matches the given pattern.

count

Counts the number of lines in the output of a command.

exclude

Displays only the output lines which do not match the given pattern. The lines matching the pattern are discarded.

head

Limits the output of a command to the first few lines. If a number is not specified then only the first 10 lines display.

include

Displays only the output lines which match the given pattern.

no-more

Temporarily disables pagination for the output of an CLI command. When the lines of output exceed the terminal length, you are not prompted to continue or quit but the entire output of the command continues to be displayed. The effect is similar to setting terminal length 0 but only for the current command.

tail

Limits the output of a command to the last few lines. If a number is not specified then only the last 10 lines display.