variable
Command Function
Modifies, obtains, and displays variables.
Syntax
Modifying a variable:
variable set [-h | --help] {-n VARIABLE_NAME | --name VARIABLE_NAME} {-v VARIABLE_VALUE | --value VARIABLE_VALUE} [-r RANK_ID | --rank RANK_ID]
Obtaining the variable value:
variable get [-h | --help] {-n VARIABLE_NAME | --name VARIABLE_NAME} [-r RANK_ID | --rank RANK_ID]
Displaying all variables:
variable list [-h | --help] [-r RANK_ID | --rank RANK_ID]
The variable command can be abbreviated as v or var.
Parameter Description
Parameter |
Option |
Parameter Description |
|---|---|---|
-h/--help |
- |
Obtains help information. This parameter is optional. |
-n/--name |
VARIABLE_NAME |
Variable name. This parameter is mandatory. |
-v/--value |
VARIABLE_VALUE |
Variable value. This parameter is mandatory. |
-r/--rank |
RANK_ID |
Rank ID. This parameter is optional. |
Parameter |
Option |
Description |
|---|---|---|
-h/--help |
- |
Obtains help information. This parameter is optional. |
-n/--name |
VARIABLE_NAME |
Variable name. This parameter is mandatory. |
-r/--rank |
RANK_ID |
Rank ID. This parameter is optional. |
Parameter |
Option |
Description |
|---|---|---|
-h/--help |
- |
Obtains help information. This parameter is optional. |
-r/--rank |
RANK_ID |
Rank ID. This parameter is optional. |
Example
Display the information about variable functions:
1 | variable -h
|
Command output:
The most commonly used variable(v) sub commands are: list Displays all variables of the specified rank. (The nested content of complex variables is not displayed.) set Sets a variable value of the specified rank. get Obtains the variable value of the specified rank. See 'variable(v/var) COMMAND -h/--help' for more information on a specific command.