Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Environment Variables

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.

  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial