Case Sensitivity

The basics of variables were discussed in Chapter 1, “The Environment.” In review, a variable is simply a way of expressing a value with a name. Hence, variables are called name-value pairs. When designing your own variable, you should keep a number of things in mind. The first is case sensitivity.

Case sensitivity means that the case—uppercase and lowercase—of each letter in the varname is significant. Therefore, two variables can look alike, but if one or more of the letters is of a different case in one of the variables then they are two different variables.

For example, each of these is a different variable:

 Apple APple APPle APPLe APPLE aPple aPPle aPPLe aPPLE applE apPle apPLe apPLE appLE ApPle appLe appLE ApPLe ApPLE ...

Get Korn Shell Programming by Example 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.