Korn Shell: Unix and Linux Programming Manual, Third Edition, The By Anatole Olczak
Table of Contents
Variables
Special Parameters
Variable Expansion
Array Variables
Compound Variables
Quoting
Variables and parameters are used by the Korn shell to store values. Like other high-level programming languages, the Korn shell supports data types and arrays. This is a major difference with the Bourne, C shell, and other scripting languages, which have no concept of data types.
The Korn shell supports four data types: string, integer, float, and array. If a data type is not explicitly defined, the Korn shell will assume that the variable is a string.
By default, all variables are global in scope. However, it is possible to declare a local variable within a function. This is discussed in more detail later in this chapter.