February 2001
Beginner to intermediate
448 pages
9h 2m
English
Official Description
Sets shell options.
Syntax
set [+ | -abCefhkmnopstuvx] [+ | -o option ...] [+ | -A name] [argument ...]
Options
-A name prepares a variable for array assignment.
-f disables filename generation.
-h causes each command to become a tracked alias when it's first encountered.
-o provides lots of options, including emacs, vi, noclobber, xtrace, verbose, ignoreeof, and so on.
-v prints shell input lines as they are read.
-x prints commands and their arguments as they are executed.
Oddities
Other arguments are positional parameters and are assigned, in order, to $1, $2, and so on.
Example
$ set den cheryl # Set up positional parameters using set $ $ print $1 $2 den cheryl $ $ print $- # Show currently set options (interactive, ...
Read now
Unlock full access