Shell and Environment Variables

One of the biggest differences between tcsh and bash is how they respectively handle variables. There are two kinds of variables to work with, as we'll see in greater detail in Chapter 13. 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. These kinds of variables contain values that travel with you throughout your login session, as well as being 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 will launch the text editor specified in the EDITOR environment variable, and the ...

Get FreeBSD® 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.