Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

Controlling Output

 

The CLI allows you many ways to control and save the output of a command.

--More--

The CLI supports a MORE facility to control the amount of output when a large amount of data is displayed. After a screen's worth of data is displayed, a "--More--" prompt is shown at the bottom of the screen and the output is suspended until the user types in one of the following keys:

  • <SPACE> to display the next screen's worth of data or remaining output.

  • <CR> to scroll down one line.

  • <q> or <SHIFT><q> to terminate the command.

The number of lines displayed is determined by the screen size values that are sent in by the Telnet or SSH client. The number of lines that are displayed for each screen of a MORE displayed are the screen size less 1 line for the "--More--" prompt.

For example:

bti7800# show equipment

Filtering Output with the Pipe (|) Output Modifier

The pipe (|) output modifier allows you filter output as well as to save the output to a file. The supported options are shown in the following table:

Option

Description

append file

Appends the output to the specified file.

begin string

Displays output beginning at the line that contains the specified string.

count

Displays a count of the number of lines of output.

exclude string

Displays lines that do not contain the specified string.

include string

Displays lines that only contain the specified string.

linnum

Enumerates lines in the output.

more

Displays a full screen's worth of lines followed by a --More-- prompt.

nomore

Displays output in its entirety without the --More-- prompt. This is useful when saving the output to a file.

save file [ overwrite ]

Saves the output to the specified file with the option to overwrite the specified file if the specified file already exists.

until string

Displays lines up to and including the line that contains the specified string.

Note

You can use multiple pipes in the same command. The order that you enter the pipes dictates the order that the pipes are executed. See example.

For example:

bti7800# show equipment | include cmm | linnum
bti7800# show equipment | linnum | include cmm