Tuesday, August 21, 2012

Internal Variables for BASH

http://tldp.org/LDP/abs/html/internalvariables.html
  • $BASH
    • path of bash binary
  • $BASH_ENV

  • $BASH_SUBSHELL
  • $BASHPID
  • $BASH_VERSINFO[n]
  • $BASH_VERSION
  • $CDPATH
  • $DIRSTACK
  • $EDITOR
  • $EUID
  • $FUNCNAME
  • $GLOBIGNORE
  • $GROUPS
  • $HOME
  • $HOSTNAME
  • $HOSTTYPE
  • $IFS
  • $IGNOREEOF
  • $LC_COLLATE
  • $LC_CTYPE
  • $LINENO
  • $MACHTYPE
  • $OLDPWD
  • $OSTYPE
  • $PATH
  • $PIPESTATUS
  • $PPID
  • $PROMPT_COMMAND
  • $PS1
  • $PS2
  • $PS3
  • $PS4
  • $PWD
  • $REPLY
  • $SECONDS
  • $SHELLOPTS
  • $SHLVL
  • $TMOUT
  • $UID
  • $0, $1, $2, etc.
  • $#
  • $*
  • $@
  • $-
  • $!
  • ${COMMAND1} &
  • $_
  • $?
  • $$
Another must-read for bash scripting is:
http://tldp.org/LDP/abs/html/parameter-substitution.html

In general, all chapters in the ABS book are recommended:
http://tldp.org/LDP/abs/html/index.html

No comments:

Post a Comment