Grep And Egrep Utilities; Less Utility - Cisco MDS 9000 Series Configuration Manual

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

Advertisement

Understanding the Command-Line Interface

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 11: grep and egrep Parameters
Parameter
count
ignore-case
invert-match
line-exp
line-number
next lines
prev lines
word-exp
expression

less Utility

You can use the less utility to display the contents of the show command output one screen at a time. You
can enter less commands at the : prompt. To display all less commands you can use, enter h at the : prompt.
OL-29291-02
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.
Cisco MDS 9000 Family NX-OS Fundamentals Configuration Guide
grep and egrep Utilities
59

Advertisement

Table of Contents
loading

Table of Contents