Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)

User Commands (k - l) ksh(1)
NAME
ksh - Describes the OSS shell
SYNOPSIS
ksh [-i][-c command_string | -s][+ | -abCefmnosuvx][+ | -o][option ...] | [argument ...] |
[file][argument ...]
The OSS shell is an interactive command interpreter and a command programming language.
The OSS shell is based on the UNIX Korn shell.
FLAGS
-c command_string
Causes ksh to read commands from command_string.
-i Causes ksh to run as an interactive shell. The SIGTERM signal is thus ignored, and
the SIGINT signal is caught, causing the current command to be terminated and a new
prompt to be output.
-r Causes ksh to run as a restricted shell.
-s Causes ksh to read commands from standard input. If you do not specify the -c ag or
do not specify any arguments to ksh other than ags, ksh automatically invokes the -s
ag. The -c ag overrides the -s ag, however.
The rest of the ags that can be used with ksh are described under the set subcommand, in the
subsection Special ksh Commands.
DESCRIPTION
ksh is an alias for sh.
The OSS shell carries out commands either interactively from a terminal keyboard or from a le.
Some important features of the OSS shell are as follows:
Command aliasing
Filename substitution
Tilde substitution
Command substitution
Parameter substitution
Job control
Inline editing
A le from which the shell carries out commands is usually called a shell script,ashell pro-
cedure,oracommand file.
A simple command is a sequence of words separated by spaces or tabs. A word is a sequence of
characters that contains no unquoted spaces or tabs. The rst word in the sequence (numbered as
0) usually species the name of a command. Any remaining words, with a few exceptions, are
passed to that command. A space refers to both spaces and tabs.
The value of a simple command is its exit value if it ends normally or (octal) 200 added to the
signal number if it terminates due to a signal. For a list of status values, see the signal() system
call.
A pipeline is a sequence of one or more commands separated by a | (vertical bar). In a pipeline,
the standard output of each command becomes the standard input of the next command. Each
527188-007 Hewlett-Packard Company 57