Hitachi

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


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.

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:

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.

Table 8‒2: UNIX-compatible commands (executable file format)

Command name

Overview

Location of command

awk

Performs text processing and pattern matching.

  • In Windows, if you specify a file or directory name that contains wildcards in an argument to a command that executes the system function, the wildcards are not expanded.

  • In Windows, if you specify a file or directory name that contains wildcards in an argument to a command connected by a pipe to the getline, print, or printf function, the wildcards are not expanded.

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.

  • In Windows, if you specify the -H, -L, or -P option and set a symbolic link in an argument, or if there is a symbolic link in a directory, the link cannot be followed because symbolic links are not supported. Note also that the -r and -R options function identically.

  • In Windows, the -p option preserves only the modification date and file access time of the source file; directory information is not preserved.

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.

  • In Windows, symbolic links are not supported.

  • In Windows, the -l option does not display the group, link count, or access permissions for users other than the owner of the file.

  • In Windows, the TZ environment variable does not apply to output. The time zone set in the Date and Time control panel is used.

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.

  • In Windows, only the access permissions of the owner are visible when overwriting.

  • In Windows, symbolic link are not supported.

  • In Windows, changing the owner is not supported in the same cases as for the cp command. Owner, group, setuid bit, and mode are not preserved.

paste

Concatenates multiple files in lines, and then outputs them to the standard output.

No limitations

rm

Removes files or directories.

  • In Windows, symbolic links are not supported.

  • In Windows, only the access permissions of the owner are visible when overwriting.

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.

  • In Windows, the statuses of the destinations of symbolic link files cannot be displayed.

  • In Windows, permissions cannot be displayed other than for file owners.

  • In Windows, 0 is always displayed as the information about the number of file blocks and the block size.

  • In Windows, drive numbers are displayed as device numbers.

  • In Windows, 0 is always displayed for an owner's user ID and for a group ID.

  • In Windows, ... is always displayed for an owner's group name.

  • In Windows, 0 is always displayed as the number of hard links.

  • In Windows, 0 is always displayed for the inode number.

  • In Windows, the destinations of symbolic link files cannot be displayed.

  • In Windows, 0 is always displayed for the total size of directories.

  • In Windows, 0 is always displayed for the major and minor device numbers.

  • In Windows, a file's most recent modification date and time is displayed for the file's most recent access date and time and for the file's most recent change date and time information.

  • In Windows, file types other than regular files or directories cannot be displayed.

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.

  • In Windows, the most recent access date and time cannot be changed.

  • In Windows, the most recent modification date and time cannot be changed for a directory.

  • In Windows, the time zone set in the TZ environment variable must match the time zone set in the Date and Time control panel.

  • In Windows, the precision of the modification time set in actual files depends on file system specifications.

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.

#

The following limitations apply to all UNIX-compatible commands that are provided in the executable file format:

(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:

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.

Table 8‒3: UNIX-compatible commands (script format)

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.