Unix: variables used by shell
September 29, 2008 23:05:12 Last update: September 29, 2008 23:06:16
These variables are set or used by the Unix shell to modify its behavior.
Bash has a much longer list and is available here:
http://www.gnu.org/software/bash/manual/bashref.html#Bash-Variables
| Variable | Description |
|---|---|
| ENV=file | Name of script that gets executed at startup; Usually, ENV=$HOME/.kshrc |
| FCEDIT=file | Editor used by fc (fix command) command. If $FCEDIT is not defined, use $EDITOR, otherwise use the default (vi or ed). |
| FPATH=dirs | Directories to search for function definitions; undefined functions are set via typeset -fu. FPATH is searched when these functions are first referenced. |
| HISTFILE=file | File in which to store command history. Default is $HOME/.sh_history for Korn shell, $HOME/.bash_history for Bash. If not set, history is lost after logout. |
| HISTSIZE=n | Max number of commands to keep in history. |
| HOME=dir | Home directory; set by login from passwd file. |
| IFS='chars' | Internal field separators. Default is space, tab, and newline. |
| LINES=n | Screen's line length; used for select lists. |
| MAIL=file | Default file in which to receive mail. Set by login. |
| MAILCHECK=n | Number of seconds between mail checks; default is 600 (10 minutes). |
| MAILPATH=files | One or more files, delimited by a colon, in which to receive mail. |
| PATH=dir | One or more pathnames, delimited by a colon, in which to search for commands to execute. |
| PS1=string | Primary prompt string; default is $. |
| PS2=string | Secondary prompt (used in multi-line commands); default is >. |
| PS3=string | Prompt string in select loops; default is #?. |
| PS4=string | Prompt string for execution trace (ksh -x or set -x); default is +. |
| SHELL | Full path of login shell (e.g., /bin/ksh). |
| TERM=string | Terminal type; for example, xterm. |
Bash has a much longer list and is available here:
http://www.gnu.org/software/bash/manual/bashref.html#Bash-Variables