Hitachi

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


test command (determines the value of a conditional expression)

Organization of this page

Format 1

test conditional-expression

Format 2

[ conditional-expression ]

Format 3

[[ conditional-expression ]]

Description

This command determines the value of a specified conditional expression. The command evaluates the value of a conditional expression specified using conditional operators. It returns 0 if the result is true or 1 if the result is false. If you execute the test command or [ ] with conditional-expression omitted, it returns 1.

For details about conditional expressions, see 5.2 Conditionals.

Return codes

Return code

Meaning

0

Normal termination

  • The result of evaluating the conditional expression was true.

1

Normal termination

  • The result of evaluating the conditional expression was false.

2

Error termination

  • The command terminated with an error.

Notes

Usage example