UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 6.2 Parent-Child Relationships Chapter 6
Shell and Environment Variables
Next: 6.4 The PATH Environment Variable
 

6.3 Predefined Environment Variables

We've said that environment variables are used to store information that you'd rather not worry about, and that there are a number of standard environment variables that many UNIX programs use. These are often called "predefined" environment variables - not because their values are predefined, but because their names and uses are predefined. Here are the most important ones:

Because Bourne-type shells don't make as strict a distinction between environment variables and shell variables as the C shell does, we've included a few things here that might not be on other people's lists.

We may have implied that environment variables are relatively constant (like your favorite editor). That's not true. For example, in a windowing environment, the current length of your window might be kept in an environment variable. That can change as often as you resize your window. What is true (fortunately) is exactly what we've said: environment variables store information that you'd rather not have to worry about.

- ML


Previous: 6.2 Parent-Child Relationships UNIX Power ToolsNext: 6.4 The PATH Environment Variable
6.2 Parent-Child Relationships Book Index6.4 The PATH Environment Variable

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System