No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Fat AP and Cloud AP V200R008C00 CLI-based Configuration Guide

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Displaying the Command Output

Displaying the Command Output

You can query the configuration information about command lines, control the method in which command outputs are displayed, and filter the command outputs.

Displaying Command Line Configurations

After the configurations are complete, you can run the display command to check the configuration and running information on the device.

For example, after all configurations of the FTP service are complete, you can run the display ftp-server command to check parameters of the FTP server. For details on the usage and functions of the display command, see Checking the Configuration in each feature of the Configuration Guide.

You can also check the current running configurations and configurations in the current view.
  • Check the current running configurations:

    display current-configuration

    The configurations that have been executed but are not valid are not displayed.

  • Check configurations in the current view:

    display this

    A configuration parameter that uses the default value or does not take effect is not displayed.

Controlling the Display Mode of Commands

  • When the display output is more than one page, you can use Pg Up and Pg Dn to display information on the previous page and the next page.

  • When the information cannot be completely displayed on one screen, the system will pause and you can view the information. You can use the function keys listed in Table 3-6 to control the display mode of command lines.

    NOTE:
    The screen-length screen-length temporary command sets the lines to be displayed temporarily on the terminal screen. If screen-length is 0, the split screen function is disabled. Therefore, the system will not pause when the information cannot be completely displayed on one screen.
Table 3-6  Display mode of commands

Key

Function

Ctrl+C or Ctrl+Z

Stops displaying information and running commands.

NOTE:

You can also press any key (the number key or letter key) except space and Enter.

Space

Continues to display the next screen of information.

Enter

Continues to display the next line of information.

Filtering Command Outputs

When running the display command to check the command output, you can use the regular expression (specifying the rule to display) to filter the output information and locate needed information quickly.

Regular Expressions

A regular expression is a mode matching tool. It consists of common characters (such as letters from a to z) and special characters (called meta-characters). The regular expression is a template according to which you can search for the required string.

A regular expression provides the following functions:
  • Searches for and obtains a sub-string that matches a rule in the string.

  • Substitutes a string based on a certain matching rule.

The regular expression consists of common characters and special characters.

  • Common characters

    Common characters are used to match themselves in a string, including all upper-case and lower-case letters, digits, punctuations, and special symbols. For example, a matches the letter "a" in "abc", 202 matches the digit "202" in "202.113.25.155", and @ matches the symbol "@" in "xxx@xxx.com".

  • Special characters

    Special characters are used together with common characters to match the complex or special string combination. Table 3-7 describes special characters and their syntax.

    Table 3-7  Description of special characters

    Special Characters

    Function

    Example

    \

    Defines an escape character, which is used to mark the next character (common or special) as the common character.

    \* matches "*".

    ^

    Matches the starting position of the string.

    ^10 matches "10.10.10.1" instead of "20.10.10.1".

    $

    Matches the ending position of the string.

    1$ matches "10.10.10.1" instead of "10.10.10.2".

    *

    Matches the preceding element zero or more times.

    10* matches "1", "10", "100", "1000", and so on.

    (10)* matches "null", "10", "1010", "101010", and so on.

    +

    Matches the preceding element one or more times.

    10+ matches "10", "100", "1000", and so on.

    (10)+ matches "10", "1010", "101010", and so on.

    ?

    Matches the preceding element zero or one time.

    NOTE:

    Huawei datacom devices do not support regular expressions with ?. When regular expressions with ? are entered on Huawei datacom devices, helpful information is provided.

    10? matches "1" or "10".

    (10)? matches "null" or "10".

    .

    Matches any single character.

    0.0 matches "0x0", "020", and so on.

    .oo. matches "book", "look", "tool", and so on.

    ()

    Defines a subexpression, which can be null. Both the expression and the subexpression should be matched.

    100(200)+ matches "100200", "100200200", and so on.

    x|y

    Matches x or y.

    100|200 matches "100" or "200".

    1(2|3)4 matches "124" or "134", instead of "1234", "14", "1224", and "1334".

    [xyz]

    Matches any single character in the regular expression.

    [123] matches the character 2 in "255".

    [^xyz]

    Matches any character that is not in the regular expression.

    [^123] matches any character except for "1", "2", and "3".

    [a-z]

    Matches any character within the specified range.

    [0-9] matches any character ranging from 0 to 9.

    [^a-z]

    Matches any character beyond the specified range.

    [^0-9] matches all non-numeric characters.

    _

    Matches a comma ",", left brace "{", right brace "}", left parenthesis "(", and right parenthesis ")".

    Matches the starting position of the input string.

    Matches the ending position of the input string.

    Matches a space.

    _2008_ matches "space 2008 space", ",2008,", "{2008}", "(2008)", "{2008)", and "(2008}".

    _2008 matches "space 2008", ",2008", "{2008","(2008".

    _2008 matches "2008 space", "2008,", "2008{","2008)".

    NOTE:

    Unless otherwise specified, all the characters in the preceding table must be printable characters.

  • Degeneration of special characters

    Certain special characters, when placed at certain positions in a regular expression, degenerate to common characters.

    • The special characters following "\" match special characters themselves.

    • The special characters "*", "+", and "?" are placed at the starting position of the regular expression. For example, +45 matches "+45" and abc(*def) matches "abc*def".

    • The special character "^" is placed at any position except for the start of the regular expression. For example, abc^ matches "abc^".

    • The special character "$" is placed at any position except for the end of the regular expression. For example, 12$2 matches "12$2".

    • A right parenthesis ")" or right bracket "]" is not paired with a corresponding left parenthesis "(" or bracket "[". For example, abc) matches "abc)" and 0-9] matches "0-9]".

    NOTE:

    Unless otherwise specified, degeneration rules also apply when the preceding regular expressions are subexpressions within parentheses.

  • Combination of common and special characters

    In actual usage, regular expressions combine multiple common and special characters to match certain strings.

Specifying a Filtering Mode in a Command
NOTE:
  • The device uses a regular expression to implement the pipe character filtering function. A display command supports the pipe character only when there is excessive output information.

  • When filtering conditions are set to query output information, the first line of the command output starts with the entire regular expression but not the string to be filtered.

Some commands can carry the keyword | count to display the number of matching entries. The keyword | count can be used together with other keyword.

Three filtering modes are provided for commands that support regular expressions.

  • | begin regular-expression: displays all the lines beginning with the line that matches the regular expression.

    Filter the character strings to be entered until the specified case-sensitive character string is displayed. All the character strings following this specified character string are displayed on the screen.

  • | exclude regular-expression: displays all the lines that do not match the regular expression.

    If the character strings to be entered do not contain the specified case-sensitive character string, they are displayed on the screen. Otherwise, they are filtered.

  • | include regular-expression: displays all the lines that match the regular expression.

    If the character strings to be entered contain the specified case-sensitive character string, they are displayed on the screen. Otherwise, they are filtered.

NOTE:

The value of regular-expression is a string of 1 to 255 characters. If regular-expression contains special characters, to interpret them literally, add a backslash "\" before the characters.

The following examples describe how to specify a filter mode in a command.

Example 1: Run the display interface brief command to display all the lines that do not match the regular expression GigabitEthernet|NULL|Wlan-Radio. GigabitEthernet|NULL|Wlan-Radio matches GigabitEthernet, NULL or Wlan-Radio.

<Huawei> display interface brief | exclude GigabitEthernet|NULL|Wlan-Radio
PHY: Physical                                                                   
*down: administratively down                                                    
(l): loopback                                                                   
(s): spoofing                                                                   
(e): ETHOAM down                                                                
(d): Dampening Suppressed                                                       
InUti/OutUti: input utility/output utility                                      
Interface                   PHY   Protocol InUti OutUti   inErrors  outErrors   
Vlanif10                    down  down        --     --          0          0   
Vlanif2001                  up    up          --     --          0          0   

Example 2: Run the display current-configuration command to display all the lines that match the regular expression vlan.

<Huawei> display current-configuration | include vlan
vlan batch 10 2001                                                              
 port trunk allow-pass vlan 2001                                                
NOTE:

The preceding information is used for reference only.

Translation
Download
Updated: 2019-01-11

Document ID: EDOC1000176006

Views: 118587

Downloads: 309

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next