HP-UX Reference (11i v3 07/02) - 1 User Commands A-M (vol 1)

k
ksh(1) ksh(1)
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 command
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 completion mes-
sage. 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.
keyword Same as -k.
markdirs All directory names resulting from le name generation have a
trailing / appended.
monitor Same as -m.
noclobber Prevents redirection > from truncating existing regular files.
Requires >| to truncate a file when turned on.
noexec Same as -n.
noglob Same as -f.
nolog Do not save function definitions in history file.
nounset Same as -u.
privileged Same as -p.
verbose Same as -v.
trackall Same as -h.
vi Activates the insert mode of a vi-style in-line editor until you
press the ESC key which puts you in move mode. A return
sends the line.
viraw Each character is processed as it is typed in vi mode.
xtrace Same as -x.
-p Disables processing of the $HOME/.profile file and uses the file
/etc/suid_profile instead of the ENV file. This mode is on whenever the
effective uid (gid) is not equal to the real uid (gid). Turning this off causes the
effective uid and gid to be set to the real uid and gid.
-s Sort the positional parameters.
-t Exit after reading and executing one command.
-u Treat unset parameters as an error when substituting.
-v Print shell input lines as they are read.
-x Print commands and their arguments as they are executed.
- Turns off -x and -v options and stops examining arguments for options.
-- Do not change any of the options; useful in setting $1 to a value beginning with -.
If no arguments follow this option, the positional parameters are unset.
Using + instead of - before a option causes the option to be turned off. These options can
also be used when invoking the shell. The current set of options can be examined by using
$-.
HP-UX 11i Version 3: February 2007 15 Hewlett-Packard Company 503