Chapter 5 Using the Command-Line Interface

Searching and Filtering Output of show and more Commands

The software assumes you have a terminal screen that is 80 columns wide. If you have a width other than that, use the terminal width privileged EXEC command to set the width of your terminal.

Use line wrapping with the command history feature to recall and modify previous complex command entries. For information about recalling previous command entries, see the “Editing Commands through Keystrokes” section on page 5-7.

Searching and Filtering Output of show and more Commands

You can search and filter the output for show and more commands. This is useful when you need to sort through large amounts of output or if you want to exclude output that you do not need to see. Using these commands is optional.

To use this functionality, use show or more command followed by the pipe character (), one of the keywords begin, include, or exclude, and an expression that you want to search for or filter out:

command {begin include exclude} regular-expression

Expressions are case sensitive. For example, if you use exclude output command, the lines that contain output are not displayed, but the lines that contain Output appear.

This example shows how to include in the output display only lines where the expression protocol appears:

Router# show interfaces include protocol

Vlan1 is up, line protocol is up

Vlan10 is up, line protocol is down

GigabitEthernet0/1 is up, line protocol is down

GigabitEthernet0/2 is up, line protocol is up

Accessing the CLI

You can access the CLI through a console connection, through Telnet, or by using the browser.

Accessing the CLI through a Console Connection or through Telnet

Before accessing the CLI, you must connect a terminal or PC to the router console port and power on the router as described in the hardware installation guide that shipped with your router.

If your router is already configured, you can access the CLI through a local console connection or through a remote Telnet session, but your router must first be configured for this type of access..

You can use one of these methods to establish a connection with the router:

Connect the router console port to a management station or dial-up modem. For information about connecting to the console port, see the router hardware installation guide.

Use any Telnet TCP/IP or encrypted Secure Shell (SSH) package from a remote management station. The router must have network connectivity with the Telnet or SSH client, and the router must have an enable secret password configured.

The router supports up to 16 simultaneous Telnet sessions. Changes made by one Telnet user are reflected in all other Telnet sessions.

The router supports up to five simultaneous secure SSH sessions.

Cisco ASR 901 Series Aggregation Services Router Software Configuration Guide

 

OL-23826-09

5-9

 

 

 

Page 109
Image 109
Cisco Systems A9014CFD manual Accessing the CLI, Command begin include exclude regular-expression