Linux / Unix set command

links: |- commands -|- index -|- home -| end

in page: Syntax Details

Syntax

set [--] [-a] [-e] [-f] [-h] [-k] [-m] [-n] [-p] [-s] [-t] [-u] [-v] [-x] [ -o option ] [ -A name ] [arg]
Using + rather than - causes these flags to be turned off.
In C shell sets the value of an environment variable.

Details

Table of set commands...

-- Do not change any of the flags; useful in setting $1 to -.
-a Mark variables which are modified or created for export.
-e Exit immediately if a command exits with a nonzero exit status. Note +e sets this off.
-f Disable file name generation.
-h Locate and remember function commands as functions are defined (function commands are normally located when the function is executed).
-k All keyword arguments are placed in the environment for a command, not just those that
precede the command name.
-m Background jobs will run in a separate process group and a line will print upon completion. The exit status of background jobs is reported in a completion message. On systems with job control, this flag is turned on automatically for interactive shells.
-n Read commands but do not execute them.
-p Disables 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 uid is not equal to the real uid, or when the effective gid is not equal to the real gid. Turning this off causes the effective uid and gid to be set to the real uid and gid.
-s Sort the positional parameters lexicographically.
-t Exit after reading and executing one command.
-u Treat unset variables as an error when substituting.
-v Print shell input lines as they are read.
-x Print commands and their arguments as they are executed.
-o option The following argument can be one of the following option names:
allexport Same as -a.
errexit Same as -e.
bgnice All background jobs are run at a lower priority. This is the default mode. emacs Puts you in an emacs style in-line editor for command entry.
gmacs Puts you in a gmacs style in-line editor for command entry.
ignoreeof The shell will not exit on end-of-file. The command exit must be used.
keyword Same as -k.
markdirs All directory names resulting from file name generation have a trailing / appended.
monitor Same as -m.
noclobber Prevents redirection > from truncating existing files. Require >| to truncate a file when turned on.
noexec Same as -n.
noglob Same as -f.
nolog Do not save function definitions in history file.
nounset Same as -u.
privileged Same as -p.
verbose Same as -v.
trackball Same as -h.
vi Puts you in insert mode of a vi style in-line editor until you hit escape character 033. This puts you in control mode. A return sends the line.
viraw Each character is processed as it is typed in vi mode.
xtrace Same as -x.
-A name Array assignment. Unset the variable name and assign values sequentially from the list arg. If +A is used, the variable name is not unset first.

2009-12-01: The above details were found on http://www.computerhope.com/unix/uset.htm, copyright 1998-2009 by Computer Hope (tm). All rights reserved. See Legal Disclaimer.


top

checked by tidy  Valid HTML 4.01 Transitional