Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The bash shell also utilizes many environment variables. While environment variables aren't commands, they often affect how shell commands operate, so it's important to know the shell environment variables. Table A.3 shows the default environment variables available in the bash shell.
Table A.3 bash Shell Environment Variables
| Variable | Description |
| $* | Contains all of the command line parameters as a single text value. |
| $@ | Contains all of the command line parameters as separate text values. |
| $# | The number of command line parameters. |
| $? | The exit status of the most recently used foreground process. |
| $- | The current command line option flags. |
| $$ | The process ID (PID) of the current shell. |
| $! | The PID of the most recently executed background process. |