HP-UX Reference (11i v2 07/12) - 1 User Commands N-Z (vol 2)
s
sh-posix(1) sh-posix(1)
-m Run background jobs in a separate process group and print a line upon completion. The exit
status of background jobs is reported in a completion 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 Set an option argument from the following list. Repeat the
-o option to specify additional option
arguments.
allexport Same as -a.
bgnice Run all background jobs at a lower priority.
emacs Use a emacs-style inline editor for command entry.
errexit Same as -e.
gmacs Use a gmacs-style inline editor for command entry.
ignoreeof Do not exit from the shell on end-of-file (eof, as defined by
stty; default is ˆD
).
The
exit special command must be used.
keyword Same as -k.
markdirs Append a trailing / to all directory names resulting from file name generation.
monitor Same as -m.
noclobber Same as -C.
noexec Same as -n.
noglob Same as -f.
nolog Do not save function definitions in history file.
notify Same as -b.
nounset Same as -u.
privileged Same as -p.
trackall Same as -h.
verbose Same as -v.
vi Use a vi-style inline editor for command entry.
viraw Process each character as it is typed in vi mode (always on).
xtrace Same as -x.
-p Disable 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 user ID (group ID) is not equal to
the real user ID (group ID). Turning this off causes the effective user ID and group ID to be set
to the real user ID and group ID.
-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.
- Turn off -x and -v options and stop examining arguments for options.
-- Do not change any of the options; useful in setting parameter 1 to a value beginning with
-.If
no arguments follow this option, the positional parameters are unset.
%
shift [n]
Rename the positional parameters from n+1 ... to 1 .... The default value of n is 1. n can be any
arithmetic expression that evaluates to a nonnegative number less than or equal to $#.
test [expr]
Evaluate conditional expression expr. See test(1) for usage and description. See also the Conditional
Expressions subsection.
The arithmetic comparison operators are not restricted to integers. They allow any arithmetic expres-
sion. The following additional primitive expressions are allowed:
-L file True if file is a symbolic link.
-e file True if file exists.
file1 -nt file2 True if file1 is newer than file2.
file1 -ot file2 True if file1 is older than file2.
HP-UX 11i Version 2: December 2007 Update − 9 − Hewlett-Packard Company 273