Command Line Editing; Filtering Show Command Output - Cisco Catalyst 6500 Series Configuration Manual

Catalyst 6500 series switch and cisco 7600 series router firewall services
Hide thumbs Also See for Catalyst 6500 Series:
Table of Contents

Advertisement

Appendix C
Understanding the Command-Line Interface

Command Line Editing

The FWSM uses the same command-line editing conventions as Cisco IOS software. You can view all
previously entered commands with the show history command or individually with the up arrow or ^p
command. Once you have examined a previously entered command, you can move forward in the list
with the down arrow or ^n command. When you reach a command you wish to reuse, you can edit it or
press the Enter key to start it. You can also delete the word to the left of the cursor with ^w, or erase the
line with ^u.
The FWSM permits up to 512 characters in a command; additional characters are ignored.

Filtering Show Command Output

You can use the "pipe" operator (|) with any show command and include a filter option and filtering
expression. The filtering is performed by matching each output line with a regular expression, similar to
Cisco IOS software. By selecting different filter options you can include or exclude all output that
matches the expression. You can also display all output beginning with the line that matches the
expression.
The syntax for using filtering options with the show command is as follows:
show command | {include | exclude | begin | grep [-v]} regexp
In this command string, the first vertical bar (|) is the pipe operator and must be included in the
command. This operator directs the output of the show command to the filter. In the syntax diagram, the
other vertical bars (|) indicate alternative options and are not part of the command.
The include option includes all output lines that match the regular expression. The grep option without
-v has the same effect. The exclude option excludes all output lines that match the regular expression.
The grep option with -v has the same effect. The begin option shows all the output lines starting with
the line that matches the regular expression.
Replace regexp with any Cisco IOS regular expression. The regular expression is not enclosed in quotes or
double-quotes, so be careful with trailing white spaces, which will be taken as part of the regular
expression.
When creating regular expressions, you can use any letter or number that you want to match. In addition,
certain keyboard characters have special meaning when used in regular expressions.
keyboard characters that have special meaning.
Table C-2
Character Type Character
period
asterisk
plus sign
caret
dollar sign
underscore
brackets
OL-6392-01
Using Special Characters in Regular Expressions
.
*
+
^
$
_
[]
Catalyst 6500 Series Switch and Cisco 7600 Series Router Firewall Services Module Configuration Guide
Special Meaning
Matches any single character, including white space.
Matches 0 or more sequences of the pattern.
Matches 1 or more sequences of the pattern.
Matches the beginning of the input string.
Matches the end of the input string.
Matches a comma (,), left brace ({), right brace (}), left parenthesis,
right parenthesis, the beginning of the input string, the end of the
input string, or a space.
Designates a range of single-character patterns.
Command Line Editing
Table C-2
lists the
C-3

Advertisement

Table of Contents
loading

This manual is also suitable for:

7600 series

Table of Contents