
k
ksh(1) |
|
|
|
| ksh(1) | |
NAME |
|
|
|
|
|
|
ksh, rksh - shell, the standard/restricted command programming language |
|
|
|
| ||
SYNOPSIS |
|
|
|
|
|
|
ksh | option ] ... | [+ o | option ] | ... | [ - c | |
string ] | [ arg ... ] |
|
|
|
|
|
rksh | option ] ... | [+ o | option ] | ... | [ - c | |
string ] | [ arg ... ] |
|
|
|
|
|
DESCRIPTION
ksh is a command programming language that executes commands read from a terminal or a ®le. rksh is a restricted version of the command interpreter ksh, used to set up login names and execution environments whose capabilities are more controlled than those of the standard shell. See Invoking ksh and Special Commands sections later in this entry for details about command line options and arguments, particularly the set command.
De®nitions metacharacter
One of the following characters:
| ; | & | ( | ) | < | > | |
blank | A tab or space character. |
|
| ||||
identifier | A sequence of letters, digits, or underscores starting with a letter or underscore. Identi®ers | ||||||
| are used as names for functions and named parameters. | ||||||
word | A sequence of characters separated by one or more | ||||||
command | A sequence of characters in the syntax of the shell language. The shell reads each com- | ||||||
| mand and carries out the desired action, either directly or by invoking separate utilities. | ||||||
special command
A command that is carried out by the shell without creating a separate process. Often called
#The # character is interpreted as the beginning of a comment. See Quoting below.
Commands
A
A pipeline is a sequence of one or more commands separated by . The standard output of each command except the last is connected by a pipe (see pipe(2)) to the standard input of the next command. Each command is run as a separate process; the shell waits for the last command to terminate. The exit status of a pipeline is the exit status of the last command in the pipeline.
A list is a sequence of one or more pipelines separated by ;, &, &&, or , and optionally terminated by ;, &, or &. Of these ®ve symbols, ;, &, and & have equal precedence. && and have a higher but also equal precedence. A semicolon (;) causes sequential execution of the preceding pipeline; an ampersand (&) causes asynchronous execution of the preceding pipeline (that is, the shell does not wait for that pipeline to ®nish). The symbol & causes asynchronous execution of the preceding command or pipeline with a two- way pipe established to the parent shell (known as a
A command is either a
Section 1−396 | − 1 − |