See the docs
Shorthands
| $$ | current bash PID of the current script |
| $? | exist status of last command |
| $_ | final arg of last command |
| $! | PID of last background job |
| $ | - flags passed to script |
Long names
Some are:
| $BASH | path to bash itself |
| $BASH_ENV | startup file when bash was invoked |
| $BASH_SUBSHELL | subshell level |
| $BASHPID | current bash PID, not the same as $$ |
| $DIRSTACK[@] | dir stack as an array, $DIRSTACK or $DIRSTACK[0] are top of the stack |
| $FUNCNAME | current function name |
| $PIPESTATUS[@] | return codes from elements of last pipe |