sort Stream Sorter
sscp Stream SCP (secure copy)
tr Translate, squeeze, and/or delete characters
uniq Discard all but one of successive identical lines
vsh The shell that understands cli command
wc Count words, lines, characters
xml Output in xml format (according to .xsd definitions)
begin Begin with the line that matches
count Count number of lines
end End with the line that matches
exclude Exclude lines that match
include Include lines that match
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 11: Filtering and Searching Keywords
DescriptionKeyword Syntax
Starts displaying at the line that contains the text that
matches the search string. The search string is case
sensitive.
begin string
Example:
show version | begin Hardware
Displays the number of lines in the command output.count
Example:
show running-config | count
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.
cut [-d character] {-b | -c | -f | -s}
Example:
show file testoutput | cut -b 1-10
Displays all lines up to the last occurrence of the
search string.
end string
Example:
show running-config | end interface
Displays all lines that do not include the search string.
The search string is case sensitive.
exclude string
Example:
show interface brief | exclude down
Displays the beginning of the output for the number
of lines specified. The default number of lines is 10.
head [lines lines]
Example:
show logging logfile | head lines 50
Cisco Nexus 5500 Series NX-OS Fundamentals Configuration Guide, Release 7.x
64 OL-30890-01
Understanding the Command-Line Interface
Filtering and Searching Keywords