OSF DCE Administration Guide--Core Components

OSF DCE Administration Guide—Core Components
value that includes spaces:
dcecp> set a "XYZ server for /.:/corp/comm_groups"
XYZ server for /.:/corp/comm_groups
dcecp> puts $a
XYZ server for /.:/corp/comm_groups
dcecp>
Use of double quotes does not disable command, variable, and backslash substitution.
Let’s look at a variation of the example used in the Section 2.4.1:
dcecp> set a solution
solution
dcecp> puts $a
solution
dcecp> puts "This is a convenient $a."
This is a convenient solution.
dcecp>
In this example, the use of quotes with the second puts command gathers five elements
into a single argument for puts by disabling special interpretation of the space
characters. However, the quotes don’t affect interpretation of the dollar sign.
2.4.3 Including Special Characters with Backslashes
We already know that dcecp relies on certain special characters such as spaces, braces,
quotes, or dollar signs to control its interpretation of elements. Sometimes, you might
want to include one special character in a string, temporarily suspending its special
interpretation. The backslash provides a form of substitution that suppresses special
interpretation of the character immediately following the backslash.
Use the backslash to insert a nonprinting space character in a string of elements. For
instance, each of the following dcecp lists have three elements:
ab\cd
ab\{
The elements in the first example are a, bc, and d. The elements in the second example
are a, b, and {. A more practical example could use the backslash to include quotes in
error messages as shown in the following code fragment:
if {[llength $a] < 2} {
error "Unable to parse \"$element_list\"."
}
2 6 Tandem Computers Incorporated 124243