Filtering And Searching Keywords - Cisco MDS 9000 Series Configuration Manual

Hide thumbs Also See for MDS 9000 Series:
Table of Contents

Advertisement

Understanding the Command-Line Interface
sscp
tr
uniq
vsh
wc
begin
count
end
exclude
include

Filtering and Searching Keywords

The Cisco NX-OS CLI provides a set of keywords that you can use with the show commands to search and
filter the command output.
This table lists the keywords for filtering and searching the CLI output.
Table 10: Filtering and Searching Keywords
Keyword Syntax
begin string
Example:
show version | begin Hardware
count
Example:
show running-config | count
cut [-d character] {-b | -c | -f | -s}
Example:
show file testoutput | cut -b 1-10
end string
Example:
show running-config | end interface
exclude string
Example:
show interface brief | exclude down
head [lines lines]
Example:
show logging logfile | head lines 50
OL-29291-02
Stream SCP (secure copy)
Translate, squeeze, and/or delete characters
Discard all but one of successive identical lines
The shell that understands cli command
Count words, lines, characters
Begin with the line that matches
Count number of lines
End with the line that matches
Exclude lines that match
Include lines that match
Description
Starts displaying at the line that contains the text that
matches the search string. The search string is case
sensitive.
Displays the number of lines in the command output.
Displays only part of the output lines. You can display
a number of bytes (-b), characters (-vcut [-d
character] {-b | -c | -f | -s}), or fields (-f). You can
also use the -d keyword to define a field delimiter
other than the tag character default. The -s keyword
suppresses the display of the lines that do not contain
the delimiter.
Displays all lines up to the last occurrence of the
search string.
Displays all lines that do not include the search string.
The search string is case sensitive.
Displays the beginning of the output for the number
of lines specified. The default number of lines is 10.
Cisco MDS 9000 Family NX-OS Fundamentals Configuration Guide
Filtering and Searching Keywords
57

Advertisement

Table of Contents
loading

Table of Contents