BSD 4_3_Reno development
[unix-history] / usr / share / man / cat1 / if.0
SH(1) UNIX Reference Manual SH(1)
N\bNA\bAM\bME\bE
s\bsh\bh - shell command interpreter
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
s\bsh\bh [-\b-c\bce\bei\bik\bkn\bnr\brs\bst\btu\buv\bvx\bx] [arg] ...
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
S\bSh\bh is a command programming language that executes commands read from a
terminal or a file. The shell this page describes is called the _\bB_\bo_\bu_\br_\bn_\be
shell.
Command line options:
If the first character of argument 0 if commands are read from
$_\bH_\bO_\bM_\bE/._\bp_\br_\bo_\bf_\bi_\bl_\be, if such a file exists. The following flags are inter-
preted by the shell when it is invoked.
-\b-c\bc _\bs_\bt_\br_\bi_\bn_\bg
Commands are read from _\bs_\bt_\br_\bi_\bn_\bg.
-\b-s\bs If the -\b-s\bs flag is present or if no arguments remain then com-
mands are read from the standard input. Shell output is writ-
ten to file descriptor 2.
-\b-i\bi If the -\b-i\bi flag is present or if the shell input and output are
attached to a terminal (as told by getty) then this shell is
_\bi_\bn_\bt_\be_\br_\ba_\bc_\bt_\bi_\bv_\be. In this case the terminate signal SIGTERM (see
sigvec(2)) is ignored (so that 'kill 0' does not kill an in-
teractive shell) and the interrupt signal SIGINT is caught and
ignored (so that wait is interruptible). In all cases SIGQUIT
is ignored by the shell.
This next set of options can be used on the command line invoking the s\bsh\bh
or set with the interactive command s\bse\bet\bt.
-\b-e\be If non interactive, exit immediately if a command fails.
-\b-k\bk All keyword arguments are placed in the environment for a com-
mand, not just those that precede the command name.
-\b-n\bn Read commands but do not execute them.
-\b-t\bt Exit after reading and executing one command.
-\b-u\bu Treat unset variables as an error when substituting.
-\b-v\bv Print shell input lines as they are read.
-\b-x\bx Print commands and their arguments as they are executed.
-\b- Turn off the -\b-x\bx and -\b-v\bv options.
C\bCo\bom\bmm\bma\ban\bnd\bds\bs .\b.
A _\bs_\bi_\bm_\bp_\bl_\be-_\bc_\bo_\bm_\bm_\ba_\bn_\bd is a sequence of non blank _\bw_\bo_\br_\bd_\bs separated by blanks (a
blank is a _\bt_\ba_\bb or a _\bs_\bp_\ba_\bc_\be). The first word specifies the name of the
command to be executed. Except as specified below the remaining words
are passed as arguments to the invoked command. The command name is
passed as argument 0 (see execve(2)). The _\bv_\ba_\bl_\bu_\be of a simple-command is
its exit status if it terminates normally or 200+_\bs_\bt_\ba_\bt_\bu_\bs if it terminates
abnormally (see _\bs_\bi_\bg_\bv_\be_\bc _\b2 for a list of status values).
A _\bp_\bi_\bp_\be_\bl_\bi_\bn_\be is a sequence of one or more _\bc_\bo_\bm_\bm_\ba_\bn_\bd_\bs separated by `|\b|'. The
standard output of each command but the last is connected by a 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.
A _\bl_\bi_\bs_\bt is a sequence of one or more _\bp_\bi_\bp_\be_\bl_\bi_\bn_\be_\bs separated by ;\b;, &\b&, &\b&&\b& or |\b|
or |\b||\b| and optionally terminated by ;\b; or &\b&. ;\b; and &\b& have equal precedence
which is lower than that of &\b&&\b& and |\b||\b|, &\b&&\b& and |\b||\b|, also have equal pre-
cedence. A semicolon causes sequential execution; an ampersand causes
the preceding _\bp_\bi_\bp_\be_\bl_\bi_\bn_\be to be executed without waiting for it to finish.
The symbol &\b&&\b& (|\b||\b|) causes the _\bl_\bi_\bs_\bt following to be executed only if the
preceding _\bp_\bi_\bp_\be_\bl_\bi_\bn_\be returns a zero (non zero) value. Newlines may appear
in a _\bl_\bi_\bs_\bt, instead of semicolons, to delimit commands.
A _\bc_\bo_\bm_\bm_\ba_\bn_\bd is either a simple-command or one of the following. The value
returned by a command is that of the last simple-command executed in the
command.
f\bfo\bor\br _\bn_\ba_\bm_\be [i\bin\bn _\bw_\bo_\br_\bd ...] d\bdo\bo _\bl_\bi_\bs_\bt d\bdo\bon\bne\be
Each time a f\bfo\bor\br command is executed _\bn_\ba_\bm_\be is set to the next
word in the f\bfo\bor\br word list. If i\bin\bn _\bw_\bo_\br_\bd ... is omitted, i\bin\bn
``$\b$@\b@'' is assumed. Execution ends when there are no more words
in the list.
c\bca\bas\bse\be _\bw_\bo_\br_\bd i\bin\bn [_\bp_\ba_\bt_\bt_\be_\br_\bn [| _\bp_\ba_\bt_\bt_\be_\br_\bn ...] )\b) _\bl_\bi_\bs_\bt ;\b;;\b;] ..._\be_\bs_\ba_\bc
A c\bca\bas\bse\be command executes the _\bl_\bi_\bs_\bt associated with the first pat-
tern that matches _\bw_\bo_\br_\bd. The form of the patterns is the same
as that used for file name generation.
i\bif\bf _\bl_\bi_\bs_\bt t\bth\bhe\ben\bn _\bl_\bi_\bs_\bt [e\bel\bli\bif\bf _\bl_\bi_\bs_\bt t\bth\bhe\ben\bn _\bl_\bi_\bs_\bt] ... [e\bel\bls\bse\be _\bl_\bi_\bs_\bt] f\bfi\bi
The _\bl_\bi_\bs_\bt following i\bif\bf is executed and if it returns zero the
_\bl_\bi_\bs_\bt following t\bth\bhe\ben\bn is executed. Otherwise, the _\bl_\bi_\bs_\bt following
e\bel\bli\bif\bf is executed and if its value is zero the _\bl_\bi_\bs_\bt following
t\bth\bhe\ben\bn is executed. Failing that the e\bel\bls\bse\be _\bl_\bi_\bs_\bt is executed.
w\bwh\bhi\bil\ble\be _\bl_\bi_\bs_\bt [d\bdo\bo _\bl_\bi_\bs_\bt] d\bdo\bon\bne\be
A w\bwh\bhi\bil\ble\be command repeatedly executes the w\bwh\bhi\bil\ble\be _\bl_\bi_\bs_\bt and if its
value is zero executes the d\bdo\bo _\bl_\bi_\bs_\bt; otherwise the loop ter-
minates. The value returned by a w\bwh\bhi\bil\ble\be command is that of the
last executed command in the d\bdo\bo _\bl_\bi_\bs_\bt. u\bun\bnt\bti\bil\bl may be used in
place of w\bwh\bhi\bil\ble\be to negate the loop termination test.
(_\bl_\bi_\bs_\bt) Execute _\bl_\bi_\bs_\bt in a subshell.
{_\bl_\bi_\bs_\bt} _\bl_\bi_\bs_\bt is simply executed.
The following words are only recognized as the first word of a command
and when not quoted.
i\bif\bf t\bth\bhe\ben\bn e\bel\bls\bse\be e\bel\bli\bif\bf f\bfi\bi c\bca\bas\bse\be i\bin\bn e\bes\bsa\bac\bc f\bfo\bor\br w\bwh\bhi\bil\ble\be u\bun\bnt\bti\bil\bl d\bdo\bo d\bdo\bon\bne\be {\b{ }\b}
C\bCo\bom\bmm\bma\ban\bnd\bd s\bsu\bub\bbs\bst\bti\bit\btu\but\bti\bio\bon\bn
The standard output from a command enclosed in a pair of back quotes (`\b``\b`)
may be used as part or all of a word; trailing newlines are removed.
P\bPa\bar\bra\bam\bme\bet\bte\ber\br s\bsu\bub\bbs\bst\bti\bit\btu\but\bti\bio\bon\bn .\b.
The character $\b$ is used to introduce substitutable parameters. Position-
al parameters may be assigned values by s\bse\bet\bt. Variables may be set by
writing
_\bn_\ba_\bm_\be=_\bv_\ba_\bl_\bu_\be [_\bn_\ba_\bm_\be=_\bv_\ba_\bl_\bu_\be] ...
$\b$ {\b{_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br}\b} A _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is a sequence of letters, digits or un-
derscores (a _\bn_\ba_\bm_\be), a digit, or any of the characters
*\b* @\b@ #\b# ?\b? -\b- $\b$ !\b! The value, if any, of the parameter is
substituted. The braces are required only when
_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is followed by a letter, digit, or under-
score that is not to be interpreted as part of its
name. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is a digit, it is a positional
parameter. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is *\b* or @\b@ then all the posi-
tional parameters, starting with $\b$1\b1, are substituted
separated by spaces. $\b$0\b0 is set from argument zero
when the shell is invoked.
$\b$ {\b{_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br-\b-_\bw_\bo_\br_\bd}\b}
If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is set, substitute its value; otherwise
substitute _\bw_\bo_\br_\bd.
$\b$ {\b{_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br=\b=_\bw_\bo_\br_\bd }\b}
If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is not set, set it to _\bw_\bo_\br_\bd; the value of
the parameter is then substituted. Positional param-
eters may not be assigned to in this way.
$\b$ {\b{_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br?\b?_\bw_\bo_\br_\bd}\b}
If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is set, substitute its value; otherwise,
print _\bw_\bo_\br_\bd and exit from the shell. If _\bw_\bo_\br_\bd is omit-
ted, a standard message is printed.
$\b$ {\b{_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br+\b+_\bw_\bo_\br_\bd}\b}
If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is set, substitute _\bw_\bo_\br_\bd; otherwise sub-
stitute nothing.
In the above _\bw_\bo_\br_\bd is not evaluated unless it is to be used as the substi-
tuted string. (So that, for example, echo ${d-'pwd'} will only execute
_\bp_\bw_\bd if _\bd is unset.)
The following _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br_\bs are automatically set by the shell.
#\b# The number of positional parameters in decimal.
-\b- Options supplied to the shell on invocation or by _\bs_\be_\bt.
?\b? The value returned by the last executed command in decimal.
$\b$ The process number of this shell.
!\b! The process number of the last background command invoked.
The following _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br_\bs are used but not set by the shell.
HOME The default argument (home directory) for the c\bcd\bd
command.
PATH The search path for commands (see _\be_\bx_\be_\bc_\bu_\bt_\bi_\bo_\bn).
MAIL If this variable is set to the name of a mail file,
the shell informs the user of the arrival of mail in
the specified file.
PS1 Primary prompt string, by default '$ '.
PS2 Secondary prompt string, by default '> '.
IFS Internal field separators, normally _\bs_\bp_\ba_\bc_\be, _\bt_\ba_\bb, and
_\bn_\be_\bw_\bl_\bi_\bn_\be. IFS is ignored if s\bsh\bh is running as root or
if the effective user id differs from the real user
id.
B\bBl\bla\ban\bnk\bk i\bin\bnt\bte\ber\brp\bpr\bre\bet\bta\bat\bti\bio\bon\bn .\b.
After parameter and command substitution, any results of substitution are
scanned for internal field separator characters (those found in $\b$IFS) and
split into distinct arguments where such characters are found. Explicit
null arguments ("" or '') are retained. Implicit null arguments (those
resulting from _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br_\bs that have no values) are removed.
F\bFi\bil\ble\be n\bna\bam\bme\be g\bge\ben\bne\ber\bra\bat\bti\bio\bon\bn .\b.
Following substitution, each command word is scanned for the characters
*\b*, ?\b? and [\b[. If one of these characters appears, the word is regarded as
a pattern. The word is replaced with alphabetically sorted file names
that match the pattern. If no file name is found that matches the pat-
tern, the word is left unchanged. The character .\b. at the start of a
file name or immediately following a /\b/, and the character /\b/, must be
matched explicitly.
*\b* Matches any string, including the null string.
?\b? Matches any single character.
[\b[.\b..\b..\b.]\b] Matches any one of the characters enclosed. A pair of
characters separated by -\b- matches any character lexically
between the pair.
Q\bQu\buo\bot\bti\bin\bng\bg .\b.
The following characters have a special meaning to the shell and cause
termination of a word unless quoted.
;\b; &\b& (\b( )\b) |\b| <\b< >\b> n\bne\bew\bwl\bli\bin\bne\be s\bsp\bpa\bac\bce\be t\bta\bab\bb
A character may be _\bq_\bu_\bo_\bt_\be_\bd by preceding it with a `\\b\'. \\b\n\bne\bew\bwl\bli\bin\bne\be is ig-
nored. All characters enclosed between a pair of quote marks (`'),
except a single quote, are quoted. Inside double quotes (``'') parameter
and command substitution occurs and \\b\ quotes the characters \\b\'\b' and $\b$.
``$*'' is equivalent to ``$\b$1\b1 $\b$2\b2 .\b..\b..\b.'' whereas
``$\b$@\b@'' is equivalent to ``$\b$1\b1'' ``$\b$2\b2'' ... .
P\bPr\bro\bom\bmp\bpt\bti\bin\bng\bg .\b.
When used interactively, the shell prompts with the value of PS1 before
reading a command. If at any time a newline is typed and further input
is needed to complete a command, the secondary prompt $\b$PS2 is issued.
I\bIn\bnp\bpu\but\bt/\b/O\bOu\but\btp\bpu\but\bt .\b.
Before a command is executed its input and output may be redirected using
a special notation interpreted by the shell. The following may appear
anywhere in a simple-command or may precede or follow a _\bc_\bo_\bm_\bm_\ba_\bn_\bd and are
not passed on to the invoked command. Substitution occurs before _\bw_\bo_\br_\bd or
_\bd_\bi_\bg_\bi_\bt is used.
<\b< _\bw_\bo_\br_\bd Use file _\bw_\bo_\br_\bd as standard input (file descriptor 0).
>\b> _\bw_\bo_\br_\bd Use file _\bw_\bo_\br_\bd as standard output (file descriptor 1). If the
file does not exist, it is created; otherwise it is truncated
to zero length.
>\b>>\b> _\bw_\bo_\br_\bd Use file _\bw_\bo_\br_\bd as standard output. If the file exists, output
is appended (by seeking to the end); otherwise the file is
created.
<\b<<\b< _\bw_\bo_\br_\bd The shell input is read up to a line the same as _\bw_\bo_\br_\bd, or end
of file. The resulting document becomes the standard input.
If any character of _\bw_\bo_\br_\bd is quoted, no interpretation is placed
upon the characters of the document; otherwise, parameter and
command substitution occurs, \\b\n\bne\bew\bwl\bli\bin\bne\be is ignored, and \\b\ is used
to quote the characters $\b$ '\b' and the first character of _\bw_\bo_\br_\bd.
<\b<&\b& _\bd_\bi_\bg_\bi_\bt
The standard input is duplicated from file descriptor _\bd_\bi_\bg_\bi_\bt;
see dup(2). Similarly for the standard output using >\b>.
<\b<&\b&-\b- The standard input is closed. Similarly for the standard out-
put using >\b>.
If one of the above is preceded by a digit, the file descriptor created
is that specified by the digit (instead of the default 0 or 1). For ex-
ample,
... 2>&1
creates file descriptor 2 to be a duplicate of file descriptor 1.
If a command is followed by &\b& then the default standard input for the
command is the empty file (_\bd_\be_\bv/_\bn_\bu_\bl_\bl). Otherwise, the environment for the
execution of a command contains the file descriptors of the invoking
shell as modified by input output specifications.
E\bEn\bnv\bvi\bir\bro\bon\bnm\bme\ben\bnt\bt
The environment is a list of name-value pairs that is passed to an exe-
cuted program in the same way as a normal argument list; see execve(2)
and environ(7). The shell interacts with the environment in several
ways. On invocation, the shell scans the environment and creates a
_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br for each name found, giving it the corresponding value. Exe-
cuted commands inherit the same environment. If the user modifies the
values of these _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br_\bs or creates new ones, none of these affects the
environment unless the e\bex\bxp\bpo\bor\brt\bt command is used to bind the shell's
_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br to the environment. The environment seen by any executed com-
mand is thus composed of any unmodified name-value pairs originally in-
herited by the shell, plus any modifications or additions, all of which
must be noted in e\bex\bxp\bpo\bor\brt\bt commands.
The environment for any _\bs_\bi_\bm_\bp_\bl_\be-_\bc_\bo_\bm_\bm_\ba_\bn_\bd may be augmented by prefixing it
with one or more assignments to _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br_\bs. Thus these two lines are
equivalent
TERM=450 cmd args
(export TERM; TERM=450; cmd args)
If the -\b-k\bk flag is set, _\ba_\bl_\bl keyword arguments are placed in the environ-
ment, even if they occur after the command name. The following prints
'a=b c' and 'c':
echo a=b c
set -k
echo a=b c
S\bSi\big\bgn\bna\bal\bls\bs .\b.
The INTERRUPT and QUIT signals for an invoked command are ignored if the
command is followed by &\b&; otherwise signals have the values inherited by
the shell from its parent. (But see also t\btr\bra\bap\bp.)
E\bEx\bxe\bec\bcu\but\bti\bio\bon\bn .\b.
Each time a command is executed the above substitutions are carried out.
Except for the 'special commands' listed below a new process is created
and an attempt is made to execute the command via an execve(2).
The shell parameter $\b$$PATH defines the search path for the directory
containing the command. Each alternative directory name is separated by
a colon (:\b:). The default path is :/_\bb_\bi_\bn:/_\bu_\bs_\br/_\bb_\bi_\bn. If the command name
contains a /\b/, the search path is not used. Otherwise, each directory in
the path is searched for an executable file. If the file has execute
permission but is not an _\ba._\bo_\bu_\bt file, it is assumed to be a file contain-
ing shell commands. A subshell (i.e., a separate process) is spawned to
read it. A parenthesized command is also executed in a subshell.
S\bSp\bpe\bec\bci\bia\bal\bl c\bco\bom\bmm\bma\ban\bnd\bds\bs .\b.
The following commands are executed in the shell process and except where
specified no input output redirection is permitted for such commands.
#\b# For non-interactive shells, everything following the #\b# is
treated as a comment, i.e. the rest of the line is ignored.
For interactive shells, the #\b# has no special effect.
:\b: No effect; the command does nothing.
.\b._\bf_\bi_\bl_\be Read and execute commands from _\bf_\bi_\bl_\be and return. The search
path $\b$PATH is used to find the directory containing _\bf_\bi_\bl_\be.
b\bbr\bre\bea\bak\bk [_\bn]
Exit from the enclosing f\bfo\bor\br or w\bwh\bhi\bil\ble\be loop, if any. If _\bn is
specified, break _\bn levels.
c\bco\bon\bnt\bti\bin\bnu\bue\be [_\bn]
Resume the next iteration of the enclosing f\bfo\bor\br or w\bwh\bhi\bil\ble\be loop.
If _\bn is specified, resume at the _\bn'th enclosing loop.
c\bcd\bd [_\ba_\br_\bg]
Change the current directory to _\ba_\br_\bg. The shell parameter
$\b$$HOME is the default _\ba_\br_\bg.
e\bev\bva\bal\bl [_\ba_\br_\bg ...]
The arguments are read as input to the shell and the resulting
command(s) executed.
e\bex\bxe\bec\bc [_\ba_\br_\bg ...]
The command specified by the arguments is executed in place of
this shell without creating a new process. Input output
arguments may appear and if no other arguments are given cause
the shell input output to be modified.
e\bex\bxi\bit\bt [_\bn]
Causes a non interactive shell to exit with the exit status
specified by _\bn. If _\bn is omitted, the exit status is that of
the last command executed. (An end of file will also exit from
the shell.)
e\bex\bxp\bpo\bor\brt\bt [_\bn_\ba_\bm_\be ...]
The given names are marked for automatic export to the
_\be_\bn_\bv_\bi_\br_\bo_\bn_\bm_\be_\bn_\bt of subsequently-executed commands. If no arguments
are given, a list of exportable names is printed.
l\blo\bog\bgi\bin\bn [_\ba_\br_\bg ...]
Equivalent to 'exec login arg ...'.
r\bre\bea\bad\bd _\bn_\ba_\bm_\be ...
One line is read from the standard input; successive words of
the input are assigned to the variables _\bn_\ba_\bm_\be in order, with
leftover words to the last variable. The return code is 0 un-
less the end-of-file is encountered.
r\bre\bea\bad\bdo\bon\bnl\bly\by [_\bn_\ba_\bm_\be ...]
The given names are marked readonly and the values of the these
names may not be changed by subsequent assignment. If no
arguments are given, a list of all readonly names is printed.
s\bse\bet\bt [-\b-e\bek\bkn\bnp\bpt\btu\buv\bvx\bx] [_\ba_\br_\bg ...]
The set flags are described in the options section at the
beginning of this man page. The current set of flags may be
found in $\b$-\b-.
Remaining arguments after the flag are positional parameters
and are assigned, in order, to $\b$1\b1, $\b$2\b2, etc. If no arguments
are given, the values of all names are printed.
s\bsh\bhi\bif\bft\bt The positional parameters from $\b$2\b2 .\b..\b..\b. are renamed $\b$1\b1 .\b..\b..\b.
t\bti\bim\bme\bes\bs Print the accumulated user and system times for processes run
from the shell.
t\btr\bra\bap\bp [_\ba_\br_\bg] [_\bn] ...
_\bA_\br_\bg is a command to be read and executed when the shell re-
ceives signal(s) _\bn. (Note that _\ba_\br_\bg is scanned once when the
trap is set and once when the trap is taken.) Trap commands are
executed in order of signal number. If _\ba_\br_\bg is absent, all
trap(s) _\bn are reset to their original values. If _\ba_\br_\bg is the
null string, this signal is ignored by the shell and by invoked
commands. If _\bn is 0, the command _\ba_\br_\bg is executed on exit from
the shell, otherwise upon receipt of signal _\bn as numbered in
sigvec(2). T\bTr\bra\bap\bp with no arguments prints a list of commands
associated with each signal number.
u\bum\bma\bas\bsk\bk [_\bn_\bn_\bn]
The user file creation mask is set to the octal value _\bn_\bn_\bn (see
umask(2)). If _\bn_\bn_\bn is omitted, the current value of the mask is
printed.
w\bwa\bai\bit\bt [_\bn]
Wait for the specified process and report its termination
status. If _\bn is not given, all currently active child
processes are waited for. The return code from this command is
that of the process waited for.
F\bFI\bIL\bLE\bES\bS
$_\bH_\bO_\bM_\bE/._\bp_\br_\bo_\bf_\bi_\bl_\be
/_\bt_\bm_\bp/_\bs_\bh*
/_\bd_\be_\bv/_\bn_\bu_\bl_\bl
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
csh(1), test(1), execve(2), environ(7)
D\bDI\bIA\bAG\bGN\bNO\bOS\bST\bTI\bIC\bCS\bS
Errors detected by the shell, such as syntax errors cause the shell to
return a non zero exit status. If the shell is being used non interac-
tively then execution of the shell file is abandoned. Otherwise, the
shell returns the exit status of the last command executed (see also
e\bex\bxi\bit\bt).
H\bHI\bIS\bST\bTO\bOR\bRY\bY
The S\bSh\bh shell appeared in Version 6 AT&Y UNIX. If <\b<<\b< is used to provide
standard input to an asynchronous process invoked by &\b&, the shell gets
mixed up about naming the input document. A garbage file /_\bt_\bm_\bp/_\bs_\bh* is
created, and the shell complains about not being able to find the file by
another name.