Cisco Catalyst 2000 Configuration Handbook page 26

Catalyst series lan switching
Table of Contents

Advertisement

system:running-config) configuration file. By default the file displays one screen
at a time with a —More— prompt at the bottom.
To search for a specific regular expression and start the output listing there, use
the begin keyword. To display only the lines that include a regular expression,
use the include keyword. To display all lines that don't include a regular expres-
sion, use the exclude keyword.
Search through output at a —More— prompt:
(—More—) {/ | + | -}regular-expression
At a —More— prompt, you can search the output by typing the slash (/) key
followed by a regular expression. To display only lines that include the regular
expression, press the plus (+) key. To display only lines that don't include the reg-
ular expression, press the minus (–) key.
What is a regular expression?
A regular expression can be used to match against lines of output. Regular
expressions are made up of patterns, either simple text strings (that is, ethernet
or ospf) or more complex matching patterns. Typically, regular expressions are
regular text words that offer a hint to a location in the output of a show com-
mand.
A more complex regular expression is made up of patterns and operators. Table
1-1 shows the characters that are used as operators:
Table 1-1 Operator Characters
Character
Meaning
.
Matches a single character.
*
Matches 0 or more sequences of the preceding pattern.
+
Matches 1 or more sequences of the preceding pattern.
?
Matches 0 or 1 occurrences of the preceding pattern.
^
Matches at the beginning of the string.
$
Matches at the end of the string.
_
Matches a comma, braces, parentheses, beginning or end of a string, or a
space.
[ ]
Defines a range of characters as a pattern.
( )
Groups characters as a pattern; if used around a pattern, the pattern can be
recalled later in the expression by using the backslash (\) and the pattern
occurrence number.
Chapter 1: CLI Usage 5

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents