Skip to Content
Linux in a Nutshell, 6th Edition
book

Linux in a Nutshell, 6th Edition

by Ellen Siever, Stephen Figgins, Robert Love, Arnold Robbins
September 2009
Beginner
942 pages
85h 34m
English
O'Reilly Media, Inc.
Content preview from Linux in a Nutshell, 6th Edition

Name

set

Synopsis

set [options arg1 arg2 ...]

With no arguments, set prints the values of all variables known to the current shell. Options can be enabled (-option) or disabled (+option). Options can also be set when the shell is invoked. (See the section Invoking the Shell in Invoking the Shell.) Arguments are assigned in order to $1, $2, etc.

Options

-a

From now on, automatically mark variables for export after defining or changing them.

-b

Print job completion messages as soon as jobs terminate; don’t wait until the next prompt.

-B

Enable brace expansion. On by default.

-C

Prevent overwriting via > redirection; use >| to overwrite files.

-e

Exit if a command yields a nonzero exit status. The ERR trap executes before the shell exits.

-E

Cause shell functions, command substitutions, and subshells to inherit the ERR trap.

-f

Ignore filename metacharacters (e.g., * ? [ ]).

-h

Locate and remember commands as they are defined. On by default.

-H

Enable csh-style (!-style) history substitution. On by default.

-k

Assignment of environment variables (var=value) takes effect regardless of where they appear on the command line. Normally, assignments must precede the command name.

-m

Enable job control; background jobs execute in a separate process group. -m is usually on by default.

-n

Read commands but don’t execute; useful for checking syntax. Ignored if the shell is interactive.

+o [mode]

With mode, disable the given shell option. Plain set +o prints the settings of all the current options in a form that can be reread ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Unix in a Nutshell, 4th Edition

Unix in a Nutshell, 4th Edition

Arnold Robbins
Linux Under the Hood

Linux Under the Hood

Sander van Vugt
Linux Kernel in a Nutshell

Linux Kernel in a Nutshell

Greg Kroah-Hartman

Publisher Resources

ISBN: 9780596806088Errata Page