Unix: variables used by shell 

Joined:
04/09/2007
Posts:
753

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.
VariableDescription
ENV=fileName of script that gets executed at startup; Usually, ENV=$HOME/.kshrc
FCEDIT=fileEditor used by fc (fix command) command. If $FCEDIT is not defined, use $EDITOR, otherwise use the default (vi or ed).
FPATH=dirsDirectories to search for function definitions; undefined functions are set via typeset -fu. FPATH is searched when these functions are first referenced.
HISTFILE=fileFile 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=nMax number of commands to keep in history.
HOME=dirHome directory; set by login from passwd file.
IFS='chars'Internal field separators. Default is space, tab, and newline.
LINES=nScreen's line length; used for select lists.
MAIL=fileDefault file in which to receive mail. Set by login.
MAILCHECK=nNumber of seconds between mail checks; default is 600 (10 minutes).
MAILPATH=filesOne or more files, delimited by a colon, in which to receive mail.
PATH=dirOne or more pathnames, delimited by a colon, in which to search for commands to execute.
PS1=stringPrimary prompt string; default is $.
PS2=stringSecondary prompt (used in multi-line commands); default is >.
PS3=stringPrompt string in select loops; default is #?.
PS4=stringPrompt string for execution trace (ksh -x or set -x); default is +.
SHELLFull path of login shell (e.g., /bin/ksh).
TERM=stringTerminal 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
Share |
| Comment  | Tags