Scalar

Two types of variables exist in the Korn shell. The first is a string; the second is a number. Of the numbers, two types are available: integers and floating-point. Most Korn shell implementations support integer numbers only. Korn shell 93, however, supports floating-point numbers. Integers are whole numbers, such as 14 and -999. Floating-points are numbers that can contain a fraction, such as 3.14159 or -99.54.

A scalar is your basic name-value pair that has been discussed in this book. A scalar has a varname and a value. That value can be accessed and assigned by the programmer, as is shown in the next two sections.

Accessing

To this point, the discussion has indicated that a variable has a value. The question therefore becomes, How ...

Get Korn Shell Programming by Example now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.