February 2001
Beginner to intermediate
448 pages
9h 2m
English
Parameter expansion substitutes the contents of the parameter in the command line. If the parameter is a variable name, the shell expands the value of the variable and replaces the variable name with the value of the variable. If the parameter is a number, the parameter is a positional parameter and represents a value on the command line. In the following example, two variables are defined. A third variable is then defined that uses the first two variables as parameters:
typeset Program=$0
typeset host=$(hostname)
typeset OutFile="/root/CHECKIT/checkout/${Program} .${host} .Current_Output"
echo $OutFile
To better illustrate this example, the example has been placed in a file called Example51.ksh. The following is the execution ...
Read now
Unlock full access