HP-UX Reference (11i v1 05/09) - 1 User Commands N-Z (vol 2)
s
sh-bourne(1) sh-bourne(1)
for file.
break [ n] Exit from the enclosing
for or while loop, if any. If n is specified, break n levels.
continue [ n ] Resume the next iteration of the enclosing
for or while loop. If n is specified,
resume at the n-th enclosing loop.
cd [ arg ] Change the current directory to arg. The shell parameter
HOME is the default arg.
The shell parameter
CDPATH defines the search path for the directory containing
arg. Alternative directory names are separated by a colon (
:). The default path is
null (meaning the current directory). Note that the current directory is specified by a
null path name, which can appear immediately after the equal sign or between the
colon delimiters anywhere else in the path list. If arg begins with a
/ the search
path is not used. Otherwise, each directory in the path is searched for arg. The
cd
command cannot be executed by rsh. See also cd(1).
echo [ arg ... ] Echo arguments. See echo(1) for usage and description.
eval [ arg ... ] The arguments are read as input to the shell and the resulting command(s) executed.
exec [ arg ... ] The command specified by the arguments is executed in place of this shell without
creating a new process. Input/output arguments can appear and, if no other argu-
ments are given, cause the shell input/output to be modified.
exit [ n ] Causes a shell to exit with the exit status specified by n.Ifn is omitted, the exit
status is that of the last command executed (an end-of-file also causes the shell to
exit.)
export [name ...]
The given names are marked for automatic export to the environment of
subsequently-executed commands. If no arguments are given, a list of names
currently included in the environment are printed. Function names cannot be
exported.
hash [-r][name ... ]
For each name, the location in the search path of the command specified by name is
determined and remembered by the shell. The
-r option causes the shell to forget
all remembered locations. If no arguments are given, information about remembered
commands is presented. hits is the number of times a command has been invoked by
the shell process. cost is a measure of the work required to locate a command in the
search path. Certain situations require that the stored location of a command be
recalculated. Commands for which this will be done are indicated by an asterisk ( * )
adjacent to the hits information. cost is incremented when the recalculation is done.
newgrp [arg ... ] Equivalent to
exec newgrp arg ... . See newgrp(1) for usage and description.
pwd Print the current working directory. See also pwd(1).
read name ... One line is read from the standard input and the first word is assigned to the first
name, the second word to the second name, etc., with leftover words assigned to the
last name. The return code is 0 unless an end-of-file is encountered.
Note that although the read command is a built-in command and is generally executed
directly by the shell, this is not the case when it is used in a pipeline. In a pipeline, a
new shell is forked to execute the read command with the result that any shell vari-
ables set are not available to the parent shell when the pipeline is finished. This has
the effect of making the read command useless in a pipeline. See also read(1).
readonly [ name ...]
The given names are marked readonly and the values of the these names cannot be
changed by subsequent assignment. If no arguments are given, a list of all readonly
names is printed.
return [n ] Causes a function to exit with the return value specified by n.Ifn is omitted, the
return status is that of the last command executed.
set [- -aefhkntuvx [ arg ...]]
set sets or unsets options, and resets the values of the positional parameters to the
args given, if any. The option list is terminated by the first argument that does not
begin with - or +, or upon encountering an argument consisting entirely of --.
HP-UX 11i Version 1: September 2005 − 6 − Hewlett-Packard Company Section 1−−887