Chapter 3. Variables and Parameters

   

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.


       
    Top
     



    Korn Shell. Unix and Linux Programming Manual, Third Edition
    Korn Shell. Unix and Linux Programming Manual, Third Edition
    ISBN: N/A
    EAN: N/A
    Year: 2000
    Pages: 177

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net