Curly Braces Substitution
A device called curly braces substitution is provided to enable
expressions to be inserted into command lines. The expression to be
evaluated is simply enclosed in curly braces
{<expression>} in the command line. Such
substitution can be used in any command line. For example, the name of
a data file might be assigned to the symbolic name DATA and it is
required to make a copy of this file for some reason. Curly braces
substition can be used in the command line to achieve this.
qcl>DATA='joke.dat'
qcl>NEWFILE='another.dat'
qcl>$cp {DATA} {NEWFILE}
The command line passed to the system will be
cp joke.dat another.dat
In this way assigned strings can easily be included in command
lines using their symbolic name or expressions involving symbolic
names.
[Next: Application Programs]
[Previous: Running Processes]
[Back to Contents]
|