Commands that generate multiple screens of output are, by default, paused after 24 lines. At the end of the paused output, the --More-- text displays. Pressing Enter displays the next line and pressing the spacebar displays the next set of lines. Use the terminal length number command to specify the number of lines to be displayed. A value of 0 (zero) prevents the router from pausing between screens of output.
Another very useful feature that improves the user experience in the command-line interface (CLI) is the filtering of show output. Filtering commands can be used to display specific sections of output. To enable the filtering command, enter a pipe (|) character after the show command and then enter a filtering parameter and a filtering expression.
The filtering parameters that can be configured after the pipe include:
- section - Shows entire section that starts with the filtering expression
- include - Includes all output lines that match the filtering expression
- exclude - Excludes all output lines that match the filtering expression
- begin - Shows all the output lines from a certain point, starting with the line that matches the filtering expression
Note: Output filters can be used in combination with any show command.
Figures 1 to 4 provide examples of the various output filters.
Use the Syntax Checker in Figure 5 to filter output.