Appendix A: Shell Variables
This list is excerpted from the bash man page and edited to make a stand-alone document. The following variables are set by bash.
BASH
Expands to the full file name used to invoke this instance of bash.
BASHOPTS
A colon-separated list of enabled shell options. Each word in the list is a valid argument for the -s option to the shopt built-in command (see “Shell Builtin Commands” in the bash man page). The options appearing in BASHOPTS are those reported as on by shopt. If this variable is in the environment when bash starts up, each shell option in the list will be enabled before reading any startup files. This variable is read-only.
BASHPID
Expands to the process ID of the current bash process. This differs from ...