Grep And Egrep Utilities - Cisco Nexus 9000 Series Configuration Manual

Nx-os fundamentals configuration guide
Hide thumbs Also See for Nexus 9000 Series:
Table of Contents

Advertisement

grep and egrep Utilities

The Cisco NX-OS software creates temporary files for the most current output for a show command for all
current and previous users sessions. You can remove these temporary files using the diff-clean command.
diff-clean [all-sessions | all-users]
By default, the diff-clean command removes the temporary files for the current user's active session. The
all-sessions keyword removes temporary files for all past and present sessions for the current user. The
all-users keyword removes temporary files for all past and present sessions for the all users.
grep and egrep Utilities
You can use the Global Regular Expression Print (grep) and Extended grep (egrep) command-line utilities to
filter the show command output.
The grep and egrep syntax is as follows:
{grep | egrep} [count] [ignore-case] [invert-match] [line-exp] [line-number] [next lines] [prev lines]
[word-exp] expression}]
This table lists the grep and egrep parameters.
Table 13: grep and egrep Parameters
Parameter
count
ignore-case
invert-match
line-exp
line-number
next lines
prev lines
word-exp
expression
Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x
66
Understanding the Command-Line Interface
Description
Displays only the total count of matched lines.
Specifies to ignore the case difference in matched
lines.
Displays lines that do not match the expression.
Displays only lines that match a complete line.
Specifies to display the line number before each
matched line.
Specifies the number of lines to display after a
matched line. The default is 0. The range is from 1
to 999.
Specifies the number of lines to display before a
matched line. The default is 0. The range is from 1
to 999.
Displays only lines that match a complete word.
Specifies a regular expression for searching the
output.

Advertisement

Table of Contents
loading

Table of Contents