su command (disables the su commands specified in job definition scripts)
- Organization of this page
Format
su [-] [user-name] [argument...]
You can create this command by using thescript_0 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 disables all su commands and their arguments that are specified in job definition scripts. This command always terminates normally with return code 0.
If job definition scripts that use the su command in a UNIX system to start and stop subsystems are migrated to a Windows system that uses a different system to start and stop subsystems, the su command processing specified in the job definition scripts might no longer be needed. In such a case, you can use this command to disable all su command definitions in job definition scripts, thereby eliminating the need to modify job definition scripts that have been migrated from a UNIX system to a Windows system.
Arguments
Return code
Return code |
Meaning |
---|---|
0 |
Normal termination |
Notes
-
In command substitution, the commands specified in arguments are still executed. If this affects the subsequent processing, check and, if necessary, revise the specification.
Usage examples
The following shows example definitions of job definition scripts. These examples assume that the su command has been created by using the script0 sample script file as the base.
-
Ignore the su commands specified in job definition scripts. The options of the su commands specified in this example are not executed:
su - ${DBADMIN} -c 'export PDDIR=/home/db/db1; start -q' if [[ $? -ge 1 ]]; then # Processing continues because the return code of su is always 0. echo "su error." 1>&2 exit 1 fi