Configuration Guide Command Line Interface Configuration
Filtering and Looking UP CLI Output Information
Filtering and Looking Up the Information Outputted by
the Show Command
To look up the specified message in the information outputted by the show command, execute
the following command:
Ruijie# show any-command |
begin regular-expression
Look up the specified content from the information
outputted by the show command and output all
information of the first line that contains this content
and subsequent lines.
1.You can execute show command in any mode.
2.The information to be looked up is case sensitive, and the
following is the same.
To filter the specified content in the information outputted by the show command, execute the
following commands:
Ruijie# show any-command |
exclude regular-expression
Filter the content from the information outputted by
the show command and output other information
excluding the line that includes the specified
content.
Ruijie#show any-command |
include regular-expression
Filter the content from the information outputted by
the show command and output the line that
includes the specified content. Other information
will be filtered.
To look up and filter the contents outputted by the show
command, it is necessary to input the pipeline sign (vertical line,
“|”) followed by lookup and filtration rules and contents (characters
or strings). The contents to be looked up and filtered are case
sensitive.
Using Command Alias
The system provides the command alias function. Any word can be specified as the alias of a
command. For example, you can define the word “mygateway” as the alias of “ip route 0.0.0.0
0.0.0.0 192.1.1.1”. Inputting this word is equal to inputting the whole string.