iTP Secure WebServer System Administrators Guide (Version 7.5+)
The pid command returns the numeric process ID of the server startup process. This ID is useful
for composing unique file names for configuration files or log scripts. Note that the process ID
returned by this command might not be the same as the ID for the server daemon process. See
“Configuration Directives” (page 198).
pwd
The pwd command returns the current working directory, which is the directory containing the
configuration script. The information returned by the pwd command is especially useful for composing
path names that are relative to the location of the configuration script.
expr expression
The expr command interprets expression as either a numeric expression or a string comparison
and returns the result.
For example:
Return ValueCommand
9expr 4+5
40expr 10*4
1expr "foo" == "foo"
0expr "foo" !="foo"
Table 38 (page 280) lists the operators allowed inTclexpressions; they are grouped in decreasing
order of precedence.
Table 38 Tcl Expression Operators
DescriptionOperator
Unary minus, bit-wise NOT, logical NOT. None of these
operators might be applied to string operands. Bit-wise
NOT might only be applied to integers.
- ~ !
Multiply, divide, remainder. None of these operators might
be applied to string operands; remainder might only be
* / %
applied to integers. The remainder always has the same
sign as the divisor and an absolute value smaller than the
divisor.
Add and subtract. Valid for all numeric operands.+ -
Left and right shift. Valid only for integer operands.<< > <
Boolean less, greater, less than or equal, greater than or
equal. Each operator produces 1 if the condition is true;
< > <= > =
0 if false. When applied to strings, these operators perform
comparison.
Boolean equal, not equal. Each operator produces a 0 or
1 result. Valid for all operand types.
== !=
Bit-wise AND. Valid only for integer operands.&
Bit-wise exclusive OR. Valid only for integer operands.^
Bit-wise OR. Valid only for integer operands.|
Logical AND. Produces a 1 result if both operands are
nonzero; 0 otherwise. Valid only for numeric operands
(integers or floating-point).
&&
280 Tool Command Language (Tcl) Basics










