O'Reilly logo

Learning the Korn Shell, 2nd Edition by Bill Rosenblatt, Arnold Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Options

These are options that can be turned on with the set -o command. All are initially off except where noted. Abbreviations, where listed, are options to set that can be used instead of the full set -o command (e.g., set -a is an abbreviation for set -o allexport). For the most part, the abbreviations are actually backward-compatible Bourne shell options. To disable an option, use set +o long-name or set +X, where long-name and X are the long form or the single character form of the option, respectively.

OptionAbbrevMeaning
allexport -a

Export all subsequently defined variables.

bgnice  

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

emacs  

Use Emacs-style command-line editing.

errexit -e

Exit the shell when a command exits with nonzero status.

gmacs  

Use Emacs-style command-line editing, but with a slightly different meaning for CTRL-T (See Chapter 2).

ignoreeof  

Disallow CTRL-D to exit the shell.

keyword -k

Execute assignments in the middle of command lines. (Very obsolete.)

markdirs  

Add / to all directory names generated from wildcard expansion.

monitor -m

Enable job control (on by default).

noclobber -C

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 for function definitions.

notify -b

Print job completion messages right away, instead of waiting for next prompt.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required