Hitachi

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


su command (executes programs with the permissions of the executing user)

Organization of this page

Format

su [-] user-name {-c command-line|script-file-path-name}
   [run-time-parameters]

script_su1 sample script file as the base. For details about how to create the command, see 2.6.6(2) Preparations for using the script-format UNIX-compatible commands (Windows only).

Description

This command executes the commands specified in the argument. The command ignores the specified user name and executes the specified commands with the permissions of the executing user.

If existing job definition scripts contain su commands, this command enables you to migrate them to a Windows system without having to rewrite the job definition scripts.

Arguments

-

Ignores the specification.

user-name

Ignores the specification.

-c command-line

Specifies the command line to be executed in the job.

You can specify for command-line any commands that can be specified in job definition scripts, such as shell operation commands and UNIX-compatible commands.

script-file-path-name

Specifies the path name of the script file that is to be executed.

run-time-parameters

Specifies the values to be set in command-line or script-file-path-name positional parameters. To include a space in a run-time parameter, you must enclose the corresponding character string in double quotation marks (").

Return code

Return code

Meaning

0

Normal termination

1 or greater

Error termination

Notes

Usage examples

The following shows example definitions of job definition scripts. These examples assume that the su command has been created by using the script_su1 sample script file as the base.