HP-UX Reference (11i v2 03/08) - 1 User Commands A-M (vol 1)

k
ksh(1) ksh(1)
pwd [ -L-P ] With no arguments prints the current working directory (equivalent to
print -r -
$PWD). The -L option (default) preserves the logical meaning of the current directory
and -P preserves the physical meaning of the current directory if it is a symbolic link.
See the special cd command, cd(1), ln(1)), and pwd(1).
read [ -prsu[ n ]] [name ][
?prompt ][name ... ]
The shell input mechanism. One line is read and broken up into words using the charac-
ters in
IFS as separators. In -r raw mode,
\ at the end of a line does not signify line
continuation. The first word is assigned to the first name, the second word to the second
name, etc., with remaining words assigned to the last name. The
-p option causes the
input line to be taken from the input pipe of a process spawned by the shell using
|&.If
the
-s option is present, the input is saved as a command in the history file. The option
-u can be used to specify a one-digit file descriptor unit to read from. The file descriptor
can be opened with the exec special command. The default value of n is
0.Ifname is
omitted,
REPLY is used as the default name. The return code is
0, unless an end-of-file
is encountered. An end-of-file with the
-p option causes cleanup for this process so that
another process can be spawned. If the first argument contains a
?, the remainder of this
word is used as a prompt when the shell is interactive. If the given file descriptor is
open for writing and is a terminal device, the prompt is placed on this unit. Otherwise
the prompt is issued on file descriptor 2. The return code is
0, unless an end-of-file is
encountered. See also read(1).
%% readonly [ name[ =value ] ... ]
The given names are marked read-only and these names cannot be changed by subse-
quent assignment.
% return [ n ] Causes a shell function to return to the invoking script with the return status specified
by n.Ifn is omitted, the return status is that of the last command executed. Only the
low 8 bits of n are passed back to the caller. If return is invoked while not in a func-
tion or executing a script by the
. (dot) built-in command, it has the same effect as an
exit command.
set [ ±aefhkmnopstuvx | ±o option ] ... [ ±A name ][arg ... ]
The following options are used for this command:
-A Array assignment. Unset the variable name and assign values sequentially
from the list arg.If+A is used, the variable name is not unset first.
-a All subsequent defined parameters are automatically exported.
-e If the shell is non-interactive and if a command fails, execute the
ERR
trap, if set, and exit immediately. This mode is disabled while reading
profiles.
-f Disables file name generation.
-h Each command whose name is an identifier becomes a tracked alias when
first encountered.
-k All parameter assignment arguments (not just those that precede the com-
mand name) are placed in the environment for a command.
-m Background jobs are run in a separate process group and a line is printed
upon completion. The exit status of background jobs is reported in a com-
pletion message. This option is turned on automatically for interactive
shells.
-n Read commands and check them for syntax errors, but do not execute
them. The -n option is ignored for interactive shells.
-o The -o argument takes any of several option names, but only one option
can be specified with each -o option. If none is supplied, the current
option settings are printed. The -o argument option names follow:
allexport Same as -a.
bgnice All background jobs are run at a lower priority.
errexit Same as -e.
emacs Activates an emacs-style in-line editor for command
entry.
gmacs Activates a gmacs-style in-line editor for command
entry.
ignoreeof The shell does not exit on end-of-file. The command
exit must be used.
Section 1416 Hewlett-Packard Company 14 HP-UX 11i Version 2: August 2003