Hitachi

JP1 Version 11 JP1/Advanced Shell Description, User's Guide, Reference, and Operator's Guide 


7.3.18 export parameter (defines an environment variable)

Syntax

export environment-variable-name=environment-variable-value

Description

This parameter defines an environment variable that is to take effect when job definition scripts are executed.

Arguments

environment-variable-name ~<environment variable name>((1 to 255 bytes))

Specifies a name for the environment variable being defined.

In Windows, the name of the environment variable is loaded as an uppercase shell variable name when DISABLE is specified for the VAR_ENV_NAME_LOWERCASE environment setting parameter.

environment-variable-value ~<any character string>

Specifies the value to be set in the environment variable.

You can specify an environment variable value containing a space by enclosing it in double-quotation marks (") or single quotation marks (') or by specifying an escape character (\) before the space. If a character string enclosed in double quotation marks (") contains the escape character (\), all the characters following \ are treated as escaped characters. Therefore, to specify \ as a part of a character string enclosed in double quotation marks, specify \\ instead of \.

You can insert the current value of the PATH environment variable by specifying ${PATH} in a desired character string. Specify ${PATH} at the target location in the following format:

export environment-variable-name=[any-character-string]${PATH}[any-character-string]

${PATH} is replaced with the value of the PATH environment variable regardless of the specification of double-quotation marks ("), single quotation marks ('), and escape characters (\). The specified double-quotation marks ("), single quotation marks ('), or escape characters (\) take effect on the entire character string inserted as the value of the PATH environment variable, and then the value is set in the environment variable.

If you define the PATH environment variable in Windows, enclose the value of the PATH environment variable in single quotation marks (') so that the resulting value containing a space or \ is interpreted correctly.

Notes

Example