home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  

Learning the Korn Shell

Learning the Korn ShellSearch this book
Previous: B.4 Test Operators Appendix B
Reference Lists
Next: B.6 Typeset Options

B.5 Options

These are options that can be turned on with the set -o command. All are initially off except where noted. Abbrev s, where listed, are arguments to set that can be used instead of the full set -o command (e.g., set -a is an abbreviation for set -o allexport ). The abbreviations are actually backward-compatible Bourne shell options.

Option Abbrev Meaning
allexport -a Export all subsequently defined variables.
errexit -e

Exit the shell when a command exits with non-0 status.


Run all background jobs at decreased priority (on by default).

emacs Use emacs-style command-line editing.

Use emacs -style command-line editing, but with a slightly different meaning for [CTRL-T] (See Chapter 2, Command-line Editing ).

ignoreeof Disallow [CTRL-D] to exit the shell.

Add / to all directory names generated from wildcard expansion.

monitor -m Enable job control (on by default).
noclobber Don't allow > redirection to existing files.
noexec -n

Read commands and check for syntax errors, but don't execute them.

noglob -f Disable wildcard expansion.
nolog Disable command history.
nounset -u Treat undefined variables as errors, not as null.
privileged -p Script is running in suid mode.
trackall -h

Substitute full pathnames for commands in alias expansions.

verbose -v Print commands (verbatim) before running them.
vi Use vi -style command-line editing.

Use vi mode and have each keystroke take effect immediately.

xtrace -x

Print commands (after expansions) before running them.

Previous: B.4 Test Operators Learning the Korn Shell Next: B.6 Typeset Options
B.4 Test Operators Book Index B.6 Typeset Options

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System