我要评分
获取效率
正确性
完整性
易理解

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

Table 1 Parameters of the set command

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.

Table 2 Parameters of the get command

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.

Table 3 Parameters of the list command

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.