Hitachi

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


command command (executes a command)

Organization of this page

Format

UNIX

command  [-p] [command  [args ...]]
command  [-v|-V] [-p] [command  [command ...]]

Windows

command  [-w] [command  [args ...]]
command  [-v|-V] [command  [command ...]]

Description

This command executes a command or a built-in command.

The command specified in command is executed with the arguments specified in args.

When the -v option is specified, the same command path name as for the whence command is output to the standard output. When the -V option is specified, the same command interpretation as for the whence -v command is output to the standard output. If the -v and -V options are both specified, the -V option takes precedence.

For details about the output format, see whence command (displays how character strings would be interpreted if used as commands).

Arguments

-p (UNIX only)

Specifies that the specified command is to be found on the standard path.

-w (Windows only)

Specifies that when an external command is executed in Windows, the following processing is not to be performed:

  • Converting \ to \\ preceding double quotation marks (") in arguments

  • Prefixing \ to any double quotation mark (") in arguments

  • Enclosing arguments in double quotation marks (")

However, even when this option is specified, the processing noted above is performed on the character string specified in command.

-v

Specifies that the command path for the character string specified in command is to be output as if it were to be treated as a command.

-V

Specifies that whether the character string specified in command is a command, reserved word, alias, standard shell command, extended shell command, or function is to be output.

command

Specifies the name of the command that is to be executed or a character string that is to be treated as a command. If this argument is omitted, the command terminates normally but without executing anything.

args

Specifies arguments to be passed to the specified command.

Return codes

Without the -v or -V option

Return code

Meaning

0

Normal termination

127

Error termination

  • The command could not be identified.

Other than the above

Error termination

  • The format of the command is invalid, or the command terminated with an error.

With the -v or -V option

Return code

Meaning

0

Normal termination

1

Error termination, or the value specified in command could not be found as a command.

Notes

Usage example