Searching and filtering output from cli commands, Searching and filtering output from show commands – Brocade NetIron CER 2000 Series Hardware Guide (Supporting R05.6.00) User Manual

Page 63

Advertising
background image

Brocade NetIron CES 2000 Series and NetIron CER 2000 Series Hardware Installation Guide

53

53-1003029-02

CLI Functionality

4

For a complete list of CLI commands and syntax information for each command, refer to Brocade
MLX Series and Brocade NetIron Family Configuration Guide
.

Searching and filtering output from CLI commands

You can filter CLI output from show commands and at the

--More--

prompt. You can search for

individual characters, strings, or construct complex regular expressions to filter the output.

Searching and filtering output from show commands

You can filter output from show commands to display lines containing a specified string, lines that
do not contain a specified string, or output starting with a line containing a specified string. The
search string is a regular expression consisting of a single character or string of characters. You can
use special characters to construct complex regular expressions. Refer to

“Using special characters

in regular expressions”

on page 56 for information on special characters used with regular

expressions.

Displaying lines containing a specified string
The following command filters the output of the show interface command for port 3/1 so it displays
only lines containing the word “Internet”. This command can be used to display the IP address of
the interface.

Brocade# show interface e 3/1 | include Internet

Internet address is 192.168.1.11/24, MTU 1518 bytes, encapsulation ethernet

Syntax: show-command | include regular-expression

TABLE 11

CLI line editing commands

Ctrl-key combination

Description

Ctrl-A

Moves to the first character on the command line.

Ctrl-B

Moves the cursor back one character.

Ctrl-C

Escapes and terminates command prompts and ongoing tasks (such as
lengthy displays), and displays a fresh command prompt.

Ctrl-D

Deletes the character at the cursor.

Ctrl-E

Moves to the end of the current command line.

Ctrl-F

Moves the cursor forward one character.

Ctrl-K

Deletes all characters from the cursor to the end of the command line.

Ctrl-L; Ctrl-R

Repeats the current command line on a new line.

Ctrl-N

Enters the next command line in the history buffer.

Ctrl-P

Enters the previous command line in the history buffer.

Ctrl-U; Ctrl-X

Deletes all characters from the cursor to the beginning of the command
line.

Ctrl-W

Deletes the last word you typed.

Ctrl-Z

Moves from any CONFIG level of the CLI to the Privileged EXEC level; at the
Privileged EXEC level, moves to the User EXEC level.

Advertising
This manual is related to the following products: