Shell and Environment Variables

One of the biggest differences between tcsh and bash lies in the way they each handle variables. You have two kinds of variables to work with: shell variables and environment variables (you’ll learn more about these variables in Chapter 10, “Shell Programming”). Let’s take a look at how the variable types differ and where they’re used.

Environment Variables

No matter which shell you’re using, you always have environment variables (variables containing values that travel with you throughout your login session and are propagated to any program spawned from within that session). Environment variables dictate the behavior of certain programs that you run. For instance, the chfn program launches the text editor specified ...

Get FreeBSD6 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.