Hitachi

Job Management Partner 1 Version 10 Job Management Partner 1/Advanced Shell Description, User's Guide, Reference, and Operator's Guide


6.2.19 Displaying shell variable information (info variables command)

The info variables command displays information about all types of shell variables. The abbreviation for the info variables command is i v. The following shows the format of the info variables command:

info variables[ variable-name]

When a variable name is specified in the argument, the command displays information about the specified shell variable. If the argument is not specified, the command displays information about all shell variables. The following shows the display format:

variable-name = variable-value [(Step local)]
...

For a variable that has no value, the command displays neither the equal sign (=) nor a variable value. The following shows the display format:

variable-name[(Step local)]

The following describes the info variables command's processing.

When the info variables command argument is omitted

The command displays information about all shell variables.

When the info variables command argument is specified

If the specified variable name exists, the command displays information about the specified shell variable.

If a nonexistent variable name is specified, the command outputs an error message.

Notes:
  • If the job definition script is not being run by the run command, variables cannot be displayed because the variables are not defined.

  • If you specify an array for the variable name, specify an array element.

  • A variable and its array 0 (example: aaa and aaa[0]) are the same. If a variable is an array within the job definition script, the variable is represented with a subscript; if a variable is not an array, it is represented without a subscript.

  • When an array is created in the shell, array element zero is created automatically. Therefore, when information about all shell variables is displayed, information about element zero is also included.

Example of output

This example displays information about all shell variables:

SHELL = /bin/sh
TEMPFILE = /tmp/file01
num = 1 (Step local variable)
val = 100