9.1 Command and control statement description formats
The following types of commands and control statements can be used in job definition script files:
Standard shell commands
Extended shell commands
Extended script commands
Script control statements
Reserved script commands
Note the following points about specifying job definition script files:
If NULL (0x00, or \0 in C language) is specified in the middle of a line, the location in the line where that NULL character occurs will be considered by the job controller to be the end of the line. Any character string (on the same line) following that NULL character will be ignored. You can prevent invalid execution results and run-time errors by avoiding use of NULL.
- Example:
Input line (0x00 is indicated by \0)
echo "test\0null";echo "test after"
Output example
echo "test
To make job definition scripts easier to read, and to ensure that coverage information is displayed properly, we recommend that only one command be specified on a line. We recommend that you not specify multiple commands on a single line using the semicolon (;) separator between them.
Note the following points about collecting coverage information on the commands specified in job definition script files:
Information about whether each command has executed can be displayed only if no more than four commands were specified on a single line.
You will be able to determine whether all the commands in an entire job definition script have executed only if no more than 32 commands were specified on a single line.
When the number of commands on one line exceeds 32, no coverage information will be acquired for the 33rd and subsequent commands. Even if all the commands in the job definition script have executed, the C0 execution ratio will not be shown as 100%.
Rather than specifying an entire script control statement, such as an if statement, on a single line, we recommend that you begin a new line at each keyword.
Specify the keywords listed below by themselves on a single line, rather than in combinations such as fi;fi. If these keywords are written on the same line, coverage information will not be displayed correctly.
fi, which marks the end of an if statement
done, which marks the end of a do block
esac, which marks the end of a case statement
Only the following coverage information is output:
C0 information: Output for only the first four C0 target commands specified on a line
C1 information: Output for only the first four execution paths on a line
When multiple commands and execution paths are specified on a single line, some coverage information might not be displayed.
Example 1:
Multiple commands and execution paths are specified on a single line
echo 1; echo 2; echo 3; echo 4; echo 5
Each command and execution path is specified on a separate line
echo 1 echo 2 echo 3 echo 4 echo 5
Example 2:
Multiple commands and execution paths are specified on a single line
if true ;then echo 1 ;elif true ;then echo 2 ;elif true ;then echo 3 ;else echo 4 ;fi
Each command and execution path is specified on a separate line
if true then echo 1 elif true then echo 2 elif true then echo 3 else echo 4 fi
To execute a command for which you provide input to the standard input from the terminal keyboard, you must do the following to complete the input:
To read input terminated by EOF
In Windows, press Enter followed by Ctrl+Z, and then press Enter again.
In UNIX, type Ctrl+D.
To read one line of input
Press Enter.
The following sections show the description formats of the commands and control statements used in job definition script files.