Hitachi

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


whence command (displays how character strings would be interpreted if used as commands)

Organization of this page

Format

whence  [-p] [-v] name  [name...]

Description

This command displays how specified character strings would be interpreted if used as commands. When neither option is specified, the output is as follows.

If the -p and -v options are both specified, the whence command assumes that a specified character string is a command and produces output accordingly. If the name argument is omitted, the command terminates with an error and returns 1 as the return code.

Arguments

-p

Specifies that the specified character strings are to be handled as commands whose paths are to be output.

-v

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

The following table shows the contents of the output:

No.

Output contents

Meaning

1

name is a reserved word

name is a reserved word.

2

name is a function

name is a function.

3

name is a traced function

name is a function for which the trace mode is enabled.

If the function is undefined and the trace mode is enabled for it, the contents shown in No. 4 are output.

4

name is an undefined function

name is an undefined function.

5

name is an extended shell command

name is an extended shell command.

6

name is a shell builtin

name is a built-in command.

7

name is a special shell builtin

name is a special built-in command.

8

name is a shell builtin not supported

name is a command that is not provided in JP1/Advanced Shell.

9

name is path-name

name is a command or executable file.

10

name is an alias for 'alias-value'

name is an alias.

11

name is an exported alias for 'alias-value'

name is an exported alias.

12

name not found

name is not a command, reserved-word, alias, standard shell command, extended shell command, or function.

name

Specifies a character string to be interpreted as a command. If this argument is omitted, the command terminates with an error and returns 1 as the return code.

Return codes

Return code

Meaning

0

Normal termination

1

Error termination. Or, one of specified character strings could not be found as a command.

Notes

Usage example