8.2.2 List of UNIX-compatible commands
Some of the UNIX-compatible commands are provided in the executable file format and some in the script format.
-
Commands provided in the executable file format
The same JP1/Advanced Shell commands can be used in both Windows and UNIX.
For details about how to specify these commands, see 8.4 UNIX-compatible commands.
-
Commands provided in the script format (Windows only)
Commands that depend on UNIX functionality are supported in Windows by being provided in the script format, thus enabling you to achieve some of the standard UNIX OS functionality while using the Windows functionality.
For details about how to specify these commands, see 8.5 UNIX-compatible commands (script format) (Windows only).
- Organization of this subsection
(1) Commands provided in the executable file format
Of the UNIX-compatible commands, those provided in the executable file format can be executed within job definition scripts. You can also execute them from the Windows command prompt and UNIX shell.
The UNIX-compatible commands provided in the executable file format are stored at the following locations:
-
Windows execution environment:
installation-folder\JP1ASE\cmd
-
Windows development environment:
installation-folder\JP1ASD\cmd
-
UNIX:
/opt/jp1as/cmd
Some UNIX-compatible commands have limitations that reflect significant differences in OS control over resources such as the file system. In addition, there are Windows-specific limitations concerning owners and groups, access permissions, and symbolic links.
The following table describes the limitations on the supported UNIX-compatible commands provided in the executable file format.
Command name |
Overview |
Location of command |
---|---|---|
awk |
Performs text processing and pattern matching. |
|
basename |
Obtains a file name from a path name, and then outputs it to the standard output. |
No limitations |
cat |
Outputs files to the standard output. |
No limitations |
cmp |
Compares binary files. |
No limitations |
cp |
Copies files or directories. |
|
cut |
Displays selected parts of lines to the standard output. |
No limitations |
date |
Displays the system date and time (cannot be used to set the date and time). |
The -a option (set time) cannot be used. |
diff |
Compares two files. |
No limitations |
dirname |
Retrieves a directory path name excluding any file name from a character string that satisfies the file path naming conventions, and then outputs the result to the standard output. |
No limitations |
egrep |
Searches for characters in files. A specified pattern is treated as an extended regular expression. This is the same processing as when the -E option is specified in the grep command. |
In Windows, symbolic links are not supported. |
expand |
Replaces the tab character with spaces in a line in which tab stops are set and then outputs the result to the standard output. |
No limitations |
expr |
Evaluates an expression. |
No limitations |
find |
Searches for files in directories. |
No limitations |
getopt |
Analyzes command line options for easy syntax analysis of shell scripts. |
No limitations |
grep |
Searches for characters in files. |
In Windows, symbolic links are not supported. |
head |
Shows the first part of files. |
No limitations |
hostname |
Displays the host name (cannot be used to set the host name). |
No limitations |
ls |
Lists the contents of files or directories. |
|
mkdir |
Creates directories. |
In Windows, the -m option for setting the mode is ignored. |
mv |
Moves files or directories; changes the name of a file or directory. |
|
paste |
Concatenates multiple files in lines, and then outputs them to the standard output. |
No limitations |
rm |
Removes files or directories. |
|
rmdir |
Removes empty directories. |
No limitations |
sed |
Replaces character strings in text. |
No limitations |
sleep |
Stops for a specified period of time. |
No limitations |
sort |
Sorts text files |
No limitations |
split |
Splits a file. |
No limitations |
stat |
Outputs the statuses of files and directories to the standard output. |
|
tail |
Outputs the last part of files. |
No limitations |
touch |
Changes the most recent access date and time or the most recent modification date and time for a file. |
|
uname |
Displays information about the OS or hardware. |
No limitations |
uniq |
Removes duplicated lines from a sorted file. |
No limitations |
wc |
Counts the number of bytes, lines, characters, or words in a file. |
No limitations |
which |
Obtains the paths of external commands to be executed from the command search path set in the PATH environment variable. |
In Windows, this command supports only those external commands that satisfy the path search rules provided in the description of the which command. |
-
In Windows, wildcards are not expanded when UNIX-compatible commands are executed from the command prompt. However, they are expanded when used in a job definition script file.
-
The messages that are output can vary depending on the platform on which the command is executed.
-
In Windows, you must use double quotation marks when executing commands from the command prompt.
-
There are limitations to the supported files. For details, see 2.2.3 Files used in JP1/Advanced Shell.
-
The path conversion functionality is not applicable to the path names generated by commands or to the file names specified in job definition script files.
-
If you use functionality that executes a program (such as the system function in the awk command or the -exec or -ok primaries in the find command) to execute an application with a GUI interface, the application might terminate when a batch job is executed. Note also that new jobs are generated when the adshexec command is executed.
(2) Commands provided in the script format (Windows only)
The UNIX-compatible commands provided in the script format can be executed only within job definition scripts.
Sample script files for the UNIX-compatible commands provided in the script format are stored at the following locations:
-
Windows execution environment:
installation-folder\JP1ASE\sample
-
Windows development environment:
installation-folder\JP1ASD\sample
Before using the UNIX-compatible commands provided in the script format, you must complete the preparations described in 2.6.6(2) Preparations for using the script-format UNIX-compatible commands (Windows only) on the sample script files provided by JP1/Advanced Shell.
The table below lists and describes the supported UNIX-compatible commands in the script format. The provided sample script file is for Windows only. To use these commands in UNIX, use the OS-provided commands.
Command name |
Overview |
---|---|
chmod |
Changes the access permissions of files and folders. |
su |
Executes programs specified in the su command. |
who |
Displays information about the users who are currently logged in. |