March 2002
Beginner
504 pages
10h 47m
English
Two types of variables can be used in shell programming:
Scalar variables
Array variables
Scalar variables can hold only one value at a time. Array variables can hold multiple values. This section explores the use of both types of variables.
Scalar variables are defined as follows:
name=value
Here name is the name of the variable, and value is the value that the variable should hold. For example,
FRUIT=peach
defines the variable FRUIT and assigns it the value peach.
![]() | Scalar variables are often referred to as name-value pairs, because a variable's name and its value can be thought of as a pair. |
Read now
Unlock full access