![Cisco ASR 14000 Series Скачать руководство пользователя страница 750](http://html.mh-extra.com/html/cisco/asr-14000-series/asr-14000-series_management-command-reference_66667750.webp)
C i s c o C o n f i d e n t i a l - B e t a R e v i e w R 3 . 7. 1
Utility Commands on Cisco IOS XR Software
utility egrep
SMR-748
Cisco ASR 14000 Series Router System Management Command Reference
OL-17231-01
utility egrep
To search a file or the results of standard input using full regular expressions, use the
utility egrep
command in EXEC mode or administration EXEC mode.
utility egrep
{
exp
expression
|
script
expression-file
} [
WORD
|
count
|
noprefix
|
nocase
|
matchfile
|
linenum
|
matchline
|
reverse
] [
file
search-file
] [
usage
]
Syntax Description
Defaults
If no files are specified, the keyboard input (standard input) is used.
If more than one input file is specified, then the filename is displayed before each line.
Command Modes
EXEC
Administration EXEC
exp
expression
(
-e
) A regular expression, whose type is determined by the -e and -f options.
This form is used when only one expression is specified on the command
line. Any names specified after this option are treated as input files.
script
expression-file
(
-f
) A file containing a set of regular expressions, each separated by a new
line. The type of the expressions is determined by the -e and -f options. This
form is used when more than one expression is specified. You can specify
more than one -f option.
The
expression-file
syntax is:
device
:
[
/
directory-path
]
/
filename
file
search-file
(Optional) The file used for the search. Replace the
search-file
argument
with the device and directory path of the file. The
search-file
syntax is:
device
:
[
/
directory-path
]
/
filename
count
(Optional) (
-c
) Displays a count of selected lines.
noprefix
(Optional) (
-h
) Displays results without a filename prefix attached to the
matched lines. This option applies only when more than one file is searched.
nocase
(Optional) (
-i
) Ignores uppercase and lowercase distinctions during
comparisons.
matchfile
(Optional) (
-l
) (“el”) Displays only the names of files containing the selected
lines.
linenum
(Optional) (
-n
) Before each output line, displays the line's line number.
matchline
(Optional) (
-x
) Includes only input lines selected against an entire fixed
string or regular expression.
reverse
(Optional) (
-v
) Selects only those lines that don't match the specified
patterns.
usage
(Optional) Displays the UNIX options supported by this command.
WORD
(Optional) UNIX command-line option string. The maximum number of
characters is 20.