Basic Command-Line Interface Commands Page 23

ADVERTISEMENT

Basic Command-Line Interface Commands
more exclude
more exclude
To filter more command output so that it excludes lines that contain a particular regular expression, use
the more exclude command in EXEC mode.
more file-url | exclude regular-expression
Syntax Description
file-url
The Universal Resource Locator (url) of the file to display. More
commands are advanced show commands; for details, see the command
reference page in this book for the more command.
|
A vertical bar (the “pipe” symbol) indicates that an output processing
specification follows.
regular-expression
Any regular expression found in more command output.
/
Specifies a search at a --More-- prompt that begins unfiltered output with
the first line that contains the regular expression.
Command Modes
EXEC
Command History
Release
Modification
11.3 AA
The more command was introduced.
12.0(1)T
This extension of the more command was introduced.
Usage Guidelines
The regular-expression argument is case sensitive and allows for complex matching requirements.
You can specify a new search at any --More-- prompt. To search the remaining output of the more
command, use the following command at the --More-- prompt:
/regular-expression
When output volume is large, the search can produce long lists of output. To interrupt the output, press
Ctrl-^ (Ctrl-Shift-6) or Ctrl-Z.
Because prior output is not saved, you cannot search or filter backward through prior output.
Examples
The following is partial sample output of the more nvram:startup-config | exclude command. The use
of | exclude service in the command specifies a filter that excludes lines that contain the regular
expression “service.” At the --More-- prompt, the user searches for the regular expression “Dialer1,”
which continues filtered output with the first line that contains “Dialer1.”
router# more nvram:startup-config | exclude service
!
version 12.0
!
hostname router
!
boot system flash
no logging buffered
!
Cisco IOS Configuration Fundamentals Command Reference
78-11740-02
FR-25

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education